Make NaTable row non editable based on particular cell value. [message #1428653] |
Mon, 22 September 2014 02:14  |
Eclipse User |
|
|
|
Based on particular value input from the user ,need to make the entire NatTable row
non editable.
Captured the user input and applied the NON EDITABLE label to the column as follows:
public void setDataValue(int columnIndex, int rowIndex,Object newValue) {
// TODO Auto-generated method stub
if(columnIndex==1 && newValue.toString().equalsIgnoreCase("no"))
{
configLabel = getConfigLabelsByPosition(columnIndex, rowIndex);
crossValidationAcc.accumulateConfigLabels(configLabel, columnIndex, rowIndex);[/i][/font]
}
super.setDataValue(columnIndex, rowIndex, newValue);
}
After applying the lable to the columnindex and rowindex need to configure the registry,Need to understand which class I need to overide to be able to apply the configuration to the NatTable ,to make the row non editable.
|
|
|
Re: Make NaTable row non editable based on particular cell value. [message #1428819 is a reply to message #1428653] |
Mon, 22 September 2014 07:53  |
Eclipse User |
|
|
|
Hi Amruta,
Try adding the following configuration to your table:
natTable.addConfiguration(new AbstractRegistryConfiguration() {
@Override
public void configureRegistry(IConfigRegistry configRegistry) {
configRegistry.registerConfigAttribute(
EditConfigAttributes.CELL_EDITABLE_RULE,
IEditableRule.NEVER_EDITABLE,
DisplayMode.EDIT,
<your label for non-editable cells>);
}
});
Hope it helps.
|
|
|
Powered by
FUDForum. Page generated in 0.03923 seconds