Disable a row in jQGrid

冷暖自知 提交于 2019-12-11 05:27:37

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/17818891/disable-a-row-in-jqgrid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!