FlexGrid: How to make a particular cell editable in a read-only column

Posted by: ross-zhu on 14 September 2017, 2:59 am EST

    • Post Options:
    • Link

    Posted 14 September 2017, 2:59 am EST

    Hi,

    There used to be a similar question being asked at:

    http://wijmo.com/topic/custom-column-editable-and-dropdown-cells/

    However the answer is not complete.

    What I want to achieve is to allow users to edit the last row whatsoever, regardless of whether that column is readonly or not. I know how to make a particular cell readonly in an editable column (column.IsReadOnly == false), but not the other way.

  • Posted 14 September 2017, 2:59 am EST

    Hello Ross,

    If a column/ row’s isReadOnly property is set to true, the whole column/row’s cell cannot be edited. This is by design and as intended.

    The only way to make a particular Cell editable is to the handle beginningEdit event and set the corresponding column/row’s isReadOnly property to false.

    Here, you need to cancel the event to make cell read only according to your condition.

    For your reference, please see the attached sample that makes last row editable.

    Thanks,

    Manish Kumar Gupta

    2017/04/FlexGrid_lastRowEditable.zip

  • Posted 14 September 2017, 2:59 am EST

    Thanks a lot, Manish. It’s interesting that column level IsReadOnly takes precedence over the cell. But I am happy with your solution.

  • Posted 24 July 2018, 3:49 am EST

    Hi,

    I am trying to do something similar but in vb.net winforms c1flexgrid. How can i make a particular cell readonly / non editable ?

    Can you please help ?

    Thanks,

    Nithya

Need extra support?

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

Learn More

Forum Channels