Home Forums WinForms controls Xceed Grid for WinForms Create detailgrid dynamically in winforms

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #17584 |

    Hi,

    I am trying to build a master/detail grid. I have structure

    class Parent

    {

    name

    List<items> item;

     

    class Items

    {

    name

    startdate

    finishdate

    }

    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

    Saumya 

     

    Imported from legacy forums. Posted by saumya (had 2098 views)

    Xceed Support
    Member
    Post count: 5658

    Hi Saumya,

    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)

    User (Old forums)
    Member
    Post count: 23064

    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)

    Xceed Support
    Member
    Post count: 5658

    Hi Saumya,

    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)

    User (Old forums)
    Member
    Post count: 23064

    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)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.