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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid Height extends Past Size of Rows

Thread ID:





124668 Jun 21,2016 03:09 PM UTC Jun 22,2016 01:54 PM UTC UWP 1
Tags: SfDataGrid
Deanna Delapasse
Asked On June 21, 2016 03:09 PM UTC

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 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 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon