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

GridDataControl Set Auto Row Height

Thread ID:





119095 May 9,2015 04:12 AM UTC May 12,2015 08:41 AM UTC WPF 3
Tags: GridDataControl
Asked On May 9, 2015 04:12 AM UTC


Good day.

How to set GridDataControl row height to 'Auto' ?

Thank you .


Ganeshkumar Lingappan [Syncfusion]
Replied On May 12, 2015 03:43 AM UTC

Hi Yap,

Thank you for contacting Syncfusion support.

We have analyzed your query and you can achieve your requirement by using Model.ResizeRowsToFit method. Please refer the below code-snippet and attached sample in below mentioned location.

Code-Snippet :

void datagrid_Loaded(object sender, RoutedEventArgs e)


this.datagrid.Model.ResizeRowsToFit(GridRangeInfo.Table(), GridResizeToFitOptions.NoShrinkSize);


We have SfDataGrid also and currently we have implemented many features in SfDataGrid and please refer the below UG links for the difference between the grids and features list for SfDataGrid. SfDataGrid has been designed based on the WPF template-based architecture which provides support to customize the Grid easily. Comparatively, the performance of SfDataGrid control is better than the GridDataControl.

For more details refer the below UG link.

UG link: http://help.syncfusion.com/ug/wpf/documents/choosebetweendiffere.htm


In SfDataGrid you can Set the AutoRowHeight through the QueryRowHeight event and refer the below code-snippet to set the AutoRowHeight in SfDataGrid.


void datagrid_QueryRowHeight(object sender, Syncfusion.UI.Xaml.Grid.QueryRowHeightEventArgs e)


e.Height = Height;

e.Handled = true;


Sample-Link : http://www.syncfusion.com/downloads/support/directtrac/138555/SelectedIndex-224945340.zip



Saranya CJ [Syncfusion]
Replied On May 12, 2015 04:16 AM UTC

From: yap rwen [mailto:leaveyap@hotmail.com]
Sent: Tuesday, May 12, 2015 12:07 AM
To: Syncfusion Support
Subject: Re: Syncfusion support community forum 119095, GridDataControl Set Auto Row Height, has been updated.

Hi Ganeshkumar,

Thank you very much.


Sent from my ASUS

Saranya CJ [Syncfusion]
Replied On May 12, 2015 08:41 AM UTC

Hi Yap,

Thank you for your revert. Please let us know if you require any other assistance on this.



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