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.
Unfortunately, activation email could not send to your email. Please try again.

Grid Height extends Past Size of Rows

Thread ID:





124668 Jun 21,2016 11:09 AM Jun 22,2016 09:54 AM UWP 1
Tags: SfDataGrid
Deanna Delapasse
Asked On June 21, 2016 11:09 AM

I want to add a border to my datagrid, but when I add BorderThickness="1,1,0,0"  for some reason the left-side border extends below my last row.  Can I tell the grid to be only as tall as my rows somehow?

I modified one of your samples to illustrate and also have added a screenshot to the zip.

Attachment: SfDataGrid_322467e7.zip

Jai Ganesh S [Syncfusion]
Replied On June 22, 2016 09:54 AM

Hi Deanna, 
You can achieve your requirement by setting the VerticalAlignment= Top in Grid like below, 
<syncfusion:SfDataGrid x:Name="sfgrid" 
                               ColumnSizer="Star" VerticalAlignment="Top" 
                               ItemsSource="{Binding MyProperty, 
                               ShowGroupDropArea="True" BorderThickness="1,1,0,0" SelectionMode="None" Margin="30,0" RowHeight="30"> 
Jai Ganesh S 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.