isCollapsed is not working in wijmo version

Posted by: bhakti_shah on 3 February 2021, 8:09 am EST

  • Posted 3 February 2021, 8:09 am EST

    Hi All,

    We need to expand or collapse rows when we click on row header [refer attached screenshot], but we are getting undefined when we are checking rootRow.isCollapsed.

    var rows = panel.rows ,[where panel is of type GridPanel]

    rootRow :any= rows[displayNumber]; [displaynumber=1,2,3,4,5,6…]

    rootRow.isCollapsed —> undefined

    please provide solution.

    Thanks in advance

  • Posted 4 February 2021, 6:43 am EST

    Hi Bhakti,

    The isCollapsed property only works with GroupRow. So, please make sure that you are providing the index of GroupRow instead of a simple row. The rows that can be expanded/collapsed are GroupRow and they will have their isCollapsed property set according to collapsed state.

    Regards,

    Ashwin

  • Posted 5 February 2021, 3:08 am EST

    Hi Ashwin,

    Thanks for your reply.

    As per your suggestion we are providing index of groupRow now instead of simple row but when we click on row then row is not expanded.

    let rows = panel.rows;

    let x:any=new GroupRow(rows);

    let rootRow :any= rows[x[1]];

    rootRow.isCollapsed=true; -->getting error

    How to extract groupRow could you please provide solution.

    Thanks,

    Bhakti

  • Posted 9 February 2021, 4:29 am EST

    Hi,

    You do not need to create a GroupRow. The row which is stored at the particular index should be a GroupRow. For example, if the row at index 1 is not a type of GroupRow, then isCollapsed will be undefined. In this sample, select different rows and check their isCollapsed property:

    https://stackblitz.com/edit/js-qhrtng

    ~regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels