We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

SFGrid Empty Space under grid

Hi,

is there any workaround or fix to remove the white space under the datagrid like in sflistview? Its the same thing like in this post, with grid: https://www.syncfusion.com/forums/140956/sflistview-displays-empty-space-under-the-last-item

Thanks!

Maria

5 Replies

BS Balasubramani Sundaram Syncfusion Team October 2, 2019 07:43 PM UTC

Hi Maria,  
 
Thank you for contacting Syncfusion support.   
 
Based on the provided information, your requirement to remove the blank space from the data grid it can be achieved by setting the “ExtendHeight” value to the data grid height to remove the blank space.  
 
Note: DataGrid will load for the minimum height and width of 300 * 300 only, if we set the height or width value less then minimum value data grid didn’t respond,  in that cause we have to set the minimum height request value for data grid to zero. 
 
Please refer the below code snippet and sample, 
 
Code snippet  
[MainPage.Xaml] 
<StackLayout> 
    <Grid> 
        <dataGrid:SfDataGrid 
                AutoGenerateColumns="True" 
                ItemsSource="{Binding OrdersInfo}" 
                x:Name="_dataGrid" 
                MinimumHeightRequest="0" 
                ColumnSizer="Star" 
                > 
            <dataGrid:SfDataGrid.Behaviors> 
                <local:DataGridBehavior BindingContext="{x:Reference _viewModel}"/> 
            </dataGrid:SfDataGrid.Behaviors> 
        </dataGrid:SfDataGrid> 
    </Grid> 
    <Button Text="Click Me"></Button> 
</StackLayout> 
 
 
 
We hope this helps. Please let us know if you need any further assistance. 
 
Regards, 
Balasubramani Sundaram. 



AN Andy October 4, 2019 12:34 PM UTC

super, it works :) 

Thank you!


FP Farjana Parveen Ayubb Syncfusion Team October 7, 2019 05:37 AM UTC

Hi Maria 
 
Thanks for the update. 
 
We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help you. 
 
Regards, 
Farjana Parveen A 



CC Christian Campos April 20, 2021 02:33 PM UTC

I'm trying to implement this but it doesn't work for my project.
How can I do this without MVVM? I fill the datagrid in the page's constructor, I handle the GridLoaded event, the MinimumHeightRequest property is 0 and the datagrid is wrapped with a grid container, the DataGrid's blank space is always showed.


CS Chandrasekar Sampathkumar Syncfusion Team April 21, 2021 07:24 PM UTC

Hi Christian, 
Thank you for using Syncfusion products. 
We have prepared simple sample based on your requirement and we regret to let you know that we are not able to replicate the issue. We have attached the tested sample for your reference and you can download the same using the following link, 
Sample Link: Sample 
Could you please replicate the issue for us in the attached sample. 
Regards, 
Chandrasekar Sampathkumar

Loader.
Live Chat Icon For mobile
Up arrow icon