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.

DataGridControl - change Row Height inside a nested Grid

Thread ID:





110060 Jul 17,2013 11:47 AM Aug 1,2013 06:58 AM WPF 1
Tags: GridControl
Kevin Airey
Asked On July 17, 2013 11:47 AM


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 06:58 AM

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.

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.