Home Forums WinForms controls Xceed Grid for WinForms Dynamic Detail Grids Reply To: Dynamic Detail Grids

User (Old forums)
Member
Post count: 23064

DetailGrids are an all or nothing feature. That is, all rows have them or all rows don’t. So when adding a DetailGrid, even if a master row does not have any child rows, the detail grid is created, but it is invisible. This is why the + will still appear, and it is not possible to remove it.

Creating DetailGrids dynamically is no different then when done in designer, that is, you can make a sample project, add a detail grid in the designer, and look at the code that is generated. This is what you will need to do when doing it dynamically through code. A DetailGridTemplates is created, and this template is used by all the rows. You can then use the InitializingDetailGrid event to feed the detail gird of each row.

Imported from legacy forums. Posted by André (had 2939 views)