I see there are previous posts regarding this subject, but they seem to be from 2012 and prior. I have 3 columns (Col1, Col2, Col3). I want the user to be able to edit the cell in the 3rd column (Col3)...but only of the value in the 2nd column (Col2) is "level 4". If the value in the 2nd column (Col2) is anything other than "level 4", I want the cell to be read only/disabled.
Works perfectly!Thank you.
Hello,
Thank you for contacting Infragistics!
You can achieve this by using the client side CellEditingEntering event. In this event you can check the value of another cell and if it is the value you are looking for cancel the event and it will prevent entering of edit mode on that cell.
if (eventArgs.getCell().get_column().get_key() == "Col3") { If (eventArgs.getCell().get_row().get_cellByColumnKey("Col2").get_value() != "level 4") { eventArgs.set_cancel(true); } }
if (eventArgs.getCell().get_column().get_key() == "Col3")
{
If (eventArgs.getCell().get_row().get_cellByColumnKey("Col2").get_value() != "level 4")
eventArgs.set_cancel(true);
}
Please let me know if you have any further questions concerning this matter.