How to Disable the cells

Posted by: sdayal on 7 February 2023, 3:50 pm EST

    • Post Options:
    • Link

    Posted 7 February 2023, 3:50 pm EST

    Hi wijmo team,

    https://stackblitz.com/edit/angular-hfym2t?file=src%2Fapp%2Fapp.component.html

    In above snippet I want to disable the full name and short name cells for all the existing entries but not for newly added. How can I do that?

  • Posted 9 February 2023, 11:47 am EST

    Hi,

    This can be done by adding wj-state-disabled class to the cells which are already present in the CollectionView. You may get the recently added data from the itemsAdded property of the CollectionView but, for that you have to add the new item using the addNew() method of CollectionView since, trackChanges will keep the record of newly added items only if proper CollectionView methods are used to add the item. Also, you may handle beginningEdit event of FlexGrid and can cancel the event if the cell contains “wj-state-disabled” class.

    Please refer to the updated sample for reference: https://stackblitz.com/edit/angular-osd2my?file=src%2Fapp%2Fapp.component.ts,src%2Fstyles.css

    Regards,

    Manish Gupta

  • Posted 9 February 2023, 4:37 pm EST

    Thank you! It worked!!!

Need extra support?

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

Learn More

Forum Channels