Cell property "locked"

Posted by: arcady on 24 February 2022, 2:04 am EST

    • Post Options:
    • Link

    Posted 24 February 2022, 2:04 am EST

    Hello, all

    In the old code for ActiveX, I see a reference to a locked property of a cell or a range of cells.

    I cannot find this property in the winForms edition.

    What is the equivalent?

    Thank you

  • Posted 24 February 2022, 4:46 am EST

    Hi,

    if you want to prevent editing of this cell, it has to be done probably be handling the event “BeforeEdit” and set “e.Cancel = true”. Thus, the cell is not editable.

    To forbid editing of a column, you can set “flexGrid.Cols[index].AllowEditing = false”

    Hope this helps

    Wolfgang

  • Posted 25 February 2022, 5:46 am EST

    Hi,

    As suggested by Wolfgang, you can use the BeforeEdit event of the C1FlexGrid to check which cell is being edited, by using the Row and Col properties of RowColEventArgs, and disable the editing for required cells by using the Cancel property RowColEventArgs.

    If you want to disable the editing for a Column/Row, you can set the AllowEditing property of that column/row to false.

    Regards

    Avnish

    PS: Thank You! Wolfgang, for the help.

  • Posted 27 February 2022, 4:46 am EST

    Thank you, all

    But I think the idea was to prevent the column to disappear from the view while scrolling to the right, not to prevent the edit.

  • Posted 28 February 2022, 2:38 am EST

    Hi,

    If you want the columns to be always visible on the left-hand side of the grid even if the user scrolls the grid horizontally, you can use the Fixed property of the ColumnCollection class. You can also use the Frozen property of the ColumnCollection class, which is similar to the Fixed property but the cells of the frozen columns can be edited by the user, whereas the cells of the Fixed columns cannot be edited by the user. Kindly refer to the link below for more information on Fixed and Frozen columns

    https://www.grapecity.com/componentone/docs/win/online-flexgrid/basic-column-operation.html#6

    Regards,

    Kartik

Need extra support?

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

Learn More

Forum Channels