Auto height of the listview

Hi,

I use a listview to show data in a profile detail page. I am using the grouping feature.

My issue is that when I add my listview in the page its height is not dynamically sized to the content of the list.

I don't want to use the scroller.

Please see the picture below:



2 Replies 1 reply marked as answer

AL Alexis August 25, 2020 09:51 PM UTC

Ok I found the solution:

Use IsScrollingEnabled="false"

However I really need this solution for the datagrid.

Is there a way to do it?


SS Sivaraman Sivagurunathan Syncfusion Team August 26, 2020 08:32 AM UTC

Hi Alexis, 

Thanks for using Syncfusion controls. 

We have checked your query. If you don’t want to scroll the DataGrid, you can load the SfDataGrid inside the ScrollView. Please refer the below code snippet and attached sample for your reference. 


<ScrollView BackgroundColor="Red"> 
    <sfgrid:SfDataGrid x:Name="dataGrid" 
                    ItemsSource="{Binding OrdersInfo}"  
                    AutoGenerateColumns="False" 
                    ColumnSizer="Star"> 
        <sfgrid:SfDataGrid.Columns > 
            <sfgrid:GridTextColumn MappingName="OrderID" /> 
            <sfgrid:GridTextColumn MappingName="FirstName" /> 
            <sfgrid:GridTextColumn MappingName="LastName" /> 
            <sfgrid:GridTextColumn MappingName="FirstName"/> 
        </sfgrid:SfDataGrid.Columns> 
    </sfgrid:SfDataGrid> 
</ScrollView> 




Regards, 
Sivaraman S 


Marked as answer
Loader.
Up arrow icon