Disabling a cell upon condition of previous cell in same row

Posted by: samvarth123 on 16 January 2020, 1:16 am EST

    • Post Options:
    • Link

    Posted 16 January 2020, 1:16 am EST - Updated 3 October 2022, 9:11 am EST

    Using angular 7 with wijmo flexgrid.

    I am trying to disable a cell depending on previous cell

    The problem is the next cell is getting disabled but allowing user to type and it disappears after we click out of the grid



    tried using wjcCore.addClass(e.cell, ‘wj-state-disabled’);

    wjcCore.addClass(e.cell, ‘wj-state-readonly’); but got the same problem.

    Please help

  • Posted 16 January 2020, 1:18 am EST

    It should not allow to type in the first place

  • Posted 16 January 2020, 4:51 pm EST

    Hi Sam,

    In our CSS file, there is no class called wj-state-readonly and just by adding the wj-state-disabled class will not prevent the editing of the cell. For this, you will need to handle the beginningEdit event, you can check the value of the previous cell and cancel the event if required. You can also add the wj-state-disabled class in the formatItem event handler to disable the cell. Please refer to the sample link below:

    https://stackblitz.com/edit/angular-2ubqau

    Regards,

    Ashwin

  • Posted 17 January 2020, 1:37 am EST

    Thanks Ashwin .It worked

Need extra support?

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

Learn More

Forum Channels