Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
865
Expanding/Collapsing Rows
posted

Is there any way rows can be expanded/collapsed at the parent level using a hyperlink instead of an expand/collapse image?

  • 5739
    posted

    Hi,

    Here's some code for the client side expansion: 

    var grid = ig_controls["WHDG"].get_gridView();

     

    var gridrow = grid.get_behaviors().get_activation().get_activeCell().get_row();

     

    gridrow.get_grid().get_rows().get_row(gridrow._index).set_expanded(true);

     Ed

  • 12679
    posted

    Hello,

    Let us know if you  need further assistance with this matter.

    Thanks

  • 33839
    Suggested Answer
    posted

    Hi craigmo,

    One option would be to add a template column to the parent band that has a hyperlink with a client click handler that expands the row.  You would have to hide the default expansion column.  Currently, there is no way to hide it.  You might be able to set a css for the EpansionCell, but that could be applied to all bands (if you have a third band and wanted the regular expansion buttons on the second level), so you might need to handle the initialize event and simply set display none to the expansion cell on the root rows.

    regards,

    David Young