RadGridView hierarchy

6 posts, 0 answers
  1. Manh
    Manh avatar
    5 posts
    Member since:
    Sep 2012

    Posted 15 Nov 2012 Link to this post

    Hi supporters,


    I have issue as followings:

    I use RadGridView hierarchy first look.
    Parent template has columns: A1, A2, A3, A4, A5
    And child template has columns: B1, B2, B3, B4, B5, B6, B7

    So i want that when i expanse a parent row then some columns in child template be visible and some columns be hide with different parent row.
    Example:
    - When i expanse Parent row 1, if child rows has columns B5 and B6 is null or zero value then hide B5, B6
    - When i expanse Parent row 2, if child rows has columns B7 is null or zero value then hide B7 (B1, B2, B3, B4, B5, B6 are visible)

    Could you please help me!

    Thanks,

    Manh



  2. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 15 Nov 2012 Link to this post

    Hello Manh,

    There is just one issue with this, the fact that you have to see the master grid as one grid and the child template as another grid.

    To clarify this, if you remove one column from the child grid, you will be (hiding) that column for all child grids, you cannot control the child grid individually for different parent rows.
    I hope you understand what i mean.

    If you have any other questions, please let me know.


    Best Regards,
    Emanuel Varga
    WinForms MVP
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Manh
    Manh avatar
    5 posts
    Member since:
    Sep 2012

    Posted 15 Nov 2012 Link to this post

    Hi,

    ok, i understood your mean. But do you have another way to solve my issue?


    Thanks,

    Manh
  5. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 15 Nov 2012 Link to this post

    Hello again Manh,

    If you really need this, i can see two different approaches, first and the simplest one, you allow the user yo have only one expanded child at a time, then this won't be an issue (so that would mean that you will always collapse other expanded rows when the user is expanding another row).

    Like this you can take the expanded row iterate trough the rows and hide / show columns based on the child data.

    Or you could use a second grid, and display in the second grid the child data, this might be slower but like this you have all the control on what data is being displayed there.

    If you have any other questions, please let me know.


    Best Regards,
    Emanuel Varga
    WinForms MVP
  6. Manh
    Manh avatar
    5 posts
    Member since:
    Sep 2012

    Posted 15 Nov 2012 Link to this post

    Hi Emanuel Varga,

    Thank you!

    Manh
  7. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 15 Nov 2012 Link to this post

    Hello Manh,

    Glad to be able to help, if this solved your problem, please mark all appropriate answers so that other users will be able to find their answer quicker,

    Thank you,

    If you have any other questions, please let me know.

    Best Regards,
    Emanuel Varga
    Winforms MVP
Back to Top
UI for WinForms is Visual Studio 2017 Ready