Question

I want to disable 1 row on my grid depending on the value of a global javascript variable. For example, lets say the value of this variable is 123. Then any row which has 123 in a column called "XYZ" should be disabled.

where would be the best way to implement such a functionality ? inside loadcomplete or beforeselectrow ?

Thanks

Was it helpful?

Solution

The best way for inline editing mode is adding not-editable-row class to the row. You can use rowattr to add the class based on the content of some column. See the answer for details.

If you use form editing you have to choose another way. It you use navGrid then you can disable some editing or hide buttons based on the value in the column of selected row. See the answer and this one for more details. beforeSelectRow is good place for such changes.

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