Setting flexgrid columnlayout reset cell templates

Posted by: umar.khan on 5 November 2019, 11:13 pm EST

    • Post Options:
    • Link

    Posted 5 November 2019, 11:13 pm EST

    I am saving columnlayout of flexgrid to persist column ordering and visibility. But when I set the columnlayout property to restore layout, it overrides cell templates and removes all styling and custom content.

  • Posted 6 November 2019, 4:54 pm EST

    Hi Umar,

    This is expected behavior because when we set the columnLayout property, the FlexGrid regenerates column from scratch. Therefore, cell templates are no longer available. But, you can use the dynamic columns method to restore the layout of the columns. Please refer to the sample below:

    https://stackblitz.com/edit/angular-ybd3fp

    Regards,

    Ashwin

  • Posted 26 October 2023, 11:26 pm EST

    HI do you have any sample code for js

  • Posted 26 October 2023, 11:26 pm EST

    HI do you have any sample code for js

  • Posted 29 October 2023, 10:04 pm EST

    Hi Surya,

    It seems you are looking for a sample in pureJS to restore the columnLayout along with the cell templates for the columns in the Flexgrid. You can refer to the sample below which demonstrates how you can restore the cell templates while restoring the columnLayout in PureJS.

    Sample link - https://jscodemine.grapecity.com/share/MJEAgQRtYE26CRXEuxt4wA/

    In case, you face any issues, please let us know.

    Regards

Need extra support?

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

Learn More

Forum Channels