changing edit options specifically dataEvents on edit form jqgrid

三世轮回 提交于 2019-12-25 07:49:27

问题


My colmodel, has a column name'count' and a editoptions dataEvent that alerts a change. In the add form i want to remove this alert and need this alert only in the edit mode.. So, i tried a couple of things in the add form beforeshowform(),using setColProp and .attr But nothing seems to work.. any help greatly appreciated.


回答1:


Setting of dataEvents inside of beforeShowForm is too late. You should make the changes inside of beforeInitData callback.

If you would need additionally to use different initializations inside of dataInit you can use the simple trick which I described here. In the case you just set any variable like inEdit to true or false and inside of beforeInitData callback and make different actions inside of dataInit depend in the value of inEdit.



来源:https://stackoverflow.com/questions/9069763/changing-edit-options-specifically-dataevents-on-edit-form-jqgrid

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