Prevent collapse event in a row flexgrid wijmo

Posted by: viethdhe130200 on 6 October 2022, 1:58 am EST

    • Post Options:
    • Link

    Posted 6 October 2022, 1:58 am EST

    This is a demo: https://stackblitz.com/edit/js-fbrjdf?file=index.js,data.js,style.css

    How do I specify not to collapse on any row that I want?

    I want to prevent collapse in Child2. The other rows still collapse normally

    I hope anyone helps me. Thank you very much.

  • Posted 6 October 2022, 5:43 pm EST

    Hello,

    You may handle the isCollapsedChanging event of TreeView and cancel the node collapse when a specific node gets collapsed/expand. Please refer to the code snippet and sample link below demonstrating the same:

      isCollapsedChanging: (s, e) => {
        if (e.node.dataItem.header == 'Child2') {
          e.cancel = true;
        }
      },

    Sample link: https://stackblitz.com/edit/js-prx22x?file=index.js

    Regards

  • Posted 6 October 2022, 6:50 pm EST

    Thank you, sonu.paney for your answer.

Need extra support?

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

Learn More

Forum Channels