Home Forums WinForms controls Xceed Grid for WinForms Dynamic Detail Grids

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

    I have a couple of questions.

    We are using detail grids in a few different ways.

    1. We statically create 2 different detail grids attached to the same datarow. The data is then dynamically bound. However, some of the data rows do not have any details. At this point we make the detail grids invisible, but the + next to the data row still appears giving the impression that if the user clicks on it a detail grid will appear (which is not the case).

    Is there a way to get rid of the + next to the datarow when the detail grids are invisible?

    2. Another way we are attempting to play with the detail grids is by creating them completely dynamically (rather than with the designer). This should give us absolute control, but I haven’t seen a good example of how to do this. Did I miss that sample?

    Thanks,
    David

    Imported from legacy forums. Posted by flyingpenguin (had 1867 views)

    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)

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