FlexGrid - Template not showing after layout restore

Posted by: eveverad3 on 5 November 2018, 5:31 am EST

    • Post Options:
    • Link

    Posted 5 November 2018, 5:31 am EST

    Hello Team,

    Working on Angular2.

    i have a column with a custom edit drop down with multi select.

    Before saving and restoring the column layout all works fine, once i restore the layout, I do not see the multi select dropdown anymore on edit mode.

    Can you please have a look, i tried to reproduce the problem: https://stackblitz.com/edit/angular-hhyw8a

    Video in attachment2018-11-05_wijmo2.zip

  • Posted 6 November 2018, 4:54 am EST

    Hi,

    The issue is arising because you are using cell-templates to add MultiSelect.

    Now what happens is when you assign a new columnLayout(i.e. restore) to grid, then grid clears previous columns, as a result, cell-template attached to those columns are lost.

    If you want to preserve the custom editors between even after assigning new columnLayout then you may handle the prepareCellForEdit event and attach the editor as required.

    Please refer to the following updated sample:

    https://stackblitz.com/edit/angular-13fiyg?file=app%2Fapp.component.ts

    ~Sharad

Need extra support?

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

Learn More

Forum Channels