Home › Forums › WinForms controls › Xceed Grid for WinForms › Create detailgrid dynamically in winforms
I am trying to build a master/detail grid. I have structure
I want to create detail grids at runtime with n number of levels. The levels of detail grid can be decided only at runtime when data is retrived.
Please help me .
Thanks in advance
Imported from legacy forums. Posted by saumya (had 2098 views)
It is possible to do this, however the Grid is a
grid, not a TreeView… Meaning that a predetermined level of detail
must be defined by precising bindings.
Therefore you would have to
write code which will dynamically insert or remove a DetailGrid from
the GridControl’s DetailGridTemplates when you need to add or remove a
new “level” of indentation.
Also, when moving an item to a lower
indentation or to a higher one, you will have to write code which will
remove the instance from its containing list and add it to the target
list of your choice.
However, this is possible and you should not encounter any issues.
Imported from legacy forums. Posted by Marc [Xceed] (had 497 views)
Thanks a lot marc. But can you provide me any help on creating detail grids dynamically in winforms. I didnt find any tutorial on this
Imported from legacy forums. Posted by saumya (had 365 views)
I have attached a sample which adds DetailGrids at runtime and not at design time. I hope this helps 🙂
Imported from legacy forums. Posted by Marc [Xceed] (had 502 views)
Thanks a lot marc, Will it be the same procedure for the design of classes i posted above. I will look into if i can modify for the above entities
Imported from legacy forums. Posted by saumya (had 1655 views)