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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to customize the Nested Grid style in the GridDataControl?

Platform: WPF |
Control: GridDataControl |
.NET Framework: 4.5 |
Product Version:

The GridDataControl provides support to customize the style for the nested grid by using QueryCellInfo event. The following screenshot illustrates the default appearance of the nested grid.

Figure 1: Default style of the Nested Grid

For customizing the styles of the nested grid, you can wire its QueryCellInfo event that is used to allow customization of each and every cell in the required format. You can wire the QueryCellInfo event for the child grid in the RecordExpanded event that gets triggered when the record is expanded.

Note: The QueryCellInfo event is invoked for each and every cell in the GridDataControl.

Refer to the following code example to wire the RecordExpanded event in the GridDataControl.




In the RecordExpanded event, you can access child models collection and wire the QueryCellInfo event of the child grid to customize the nested grid style. With the help of the ChildModels.TableProperties, you can also customize the entire child grid properties like DefaultHeaderRowHeight, AllowEdit, AllowDelete, etc.

The following code example illustrates how to wire the QueryCellInfo event and apply DefaultHeaderRowHeight for the child grid.




The following code example illustrates how to customize the style of Header Row and RowHeader for child grid in the QueryCellInfo event.




The above style has been applied to the child grid as shown in the following screenshot.

Figure 2: After customizing the Nested Grid’s Style

You can refer to the following sample link for customizing the nested grid style without applying the style of its parent grid.

Sample Link: StyleForNesedGrid_WPF

2X faster development

The ultimate WPF UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

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

Up arrow icon

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

Live Chat Icon For mobile