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

Grid Height extends Past Size of Rows

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

1 Reply

JG Jai Ganesh S Syncfusion Team June 22, 2016 01:54 PM UTC

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 

Live Chat Icon For mobile
Up arrow icon