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:

Created:

Updated:

Platform:

Replies:

124668 Jun 21,2016 11:09 AM Jun 22,2016 09:54 AM UWP 1
loading
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" 
                               AllowFiltering="True" 
                               AllowGrouping="False" 
                               AllowResizingColumns="True" 
                               AutoGenerateColumns="True" 
                               ColumnSizer="Star" VerticalAlignment="Top" 
                               ItemsSource="{Binding MyProperty, 
                                                     Mode=TwoWay}" 
                               ShowGroupDropArea="True" BorderThickness="1,1,0,0" SelectionMode="None" Margin="30,0" RowHeight="30"> 
             
 </syncfusion:SfDataGrid> 
 
 
 
Regards, 
Jai Ganesh S 


CONFIRMATION

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.

;