, SWT.check.
:
TableItem[] item = table.getItems();
for(int j=0; j<item.length;j++)
{
TableItem tblItem = item[j];
if (tblItem.getChecked())
{
table.setSelection(j);
if(codition for the checkbox to be non-Editable written here)
{
item[table.getSelectionIndex()].setChecked(false);
}
}
}
In the above code, after filling in the table and when the user tries to check an element in the table, the above code should be called. If you click the checkmark, if the condition is valid for the checkBox, so that it is not editable, the flag is not selected, otherwise it will be selected. Thus, in the table, some rows may be editable, while others may not be editable in accordance with the required condition.
source
share