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

DataGridControl - change Row Height inside a nested Grid

Thread ID:





110060 Jul 17,2013 03:47 PM UTC Aug 1,2013 10:58 AM UTC WPF 1
Tags: GridControl
Kevin Airey
Asked On July 17, 2013 03:47 PM UTC


To be able to control the Row Height within a DataGrid, I know you have to either setup a dependency property for XAML to use or use code behind but you do not seem to be able to do this for any nested Grids (relations)?, basically you cannot do something like this:

foreach (var Relation in this.uxAssembliesDataGrid.Relations)


Relation.TableProperties.RowHeights.DefaultLineSize = 30d;


Any suggestions?




Divya A [Syncfusion]
Replied On August 1, 2013 10:58 AM UTC

Hi Kevin,


We can set the DefaultLineSize for the nested grid in the RecordExpanded event. Here, we can get the Model of each nested Child and can set the row height through DefaultLineSize API as in the following code snippet.



Code Snippet:


       this.dataGrid.ModelLoaded += new EventHandler(dataGrid_ModelLoaded);


        void dataGrid_ModelLoaded(object sender, EventArgs e)


            this.dataGrid.Model.Table.RecordExpanded+=new EventHandler<GridDataValueEventArgs<GridDataRecord>>(Table_RecordExpanded);



        void Table_RecordExpanded(object sender, GridDataValueEventArgs<GridDataRecord> e)


            e.Value.ChildModels[0].RowHeights.DefaultLineSize = 30d;







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