更改编辑选项,特别是编辑表单jqgrid上的dataEvents [英] changing edit options specifically dataEvents on edit form jqgrid

查看:370
本文介绍了更改编辑选项,特别是编辑表单jqgrid上的dataEvents的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的colmodel,具有一个列名"count"和一个用于警告更改的editoptions dataEvent. 在添加表单中,我要删除此警报,并且仅在编辑模式下需要此警报. 所以,我尝试使用setColProp和.attr在添加表单beforeshowform()的过程中做了几件事 但是似乎没有任何效果.任何帮助都将不胜感激.

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.

推荐答案

数据事件" rel ="nofollow noreferrer"> beforeShowForm 为时已晚.您应该在beforeInitData回调内部进行更改.

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

如果您还需要在dataInit内部使用其他初始化,则可以使用我在此处描述的简单技巧>.在这种情况下,您只需将inEdit设置为truefalse并在beforeInitData回调内部进行设置,并在dataInit内部进行不同的操作就取决于inEdit的值.

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.

这篇关于更改编辑选项,特别是编辑表单jqgrid上的dataEvents的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆