Question

Is there any possibility to prohibit edit on a single cell of a table? Just to underline - I'm not talking about a grid but about a table control on a form.

Accessing a single cell via <tablecontrol>.cell(col,row) does not provide functions as allowEdit or enable.

Was it helpful?

Solution

Try to override the method gotFocus on the IntEdit control on the FRM:tutorial_From_Table with the following code:

public void gotFocus()
{
    ;
    intEdit.allowEdit(!(table.column() == 2 && table.row() == 2));

    super();
}

This code does not allow to edit the (2, 2) cell. I hope it will help.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top