【发布时间】:2010-01-01 04:32:35
【问题描述】:
我有一个 jqGrid,其中包含要在表单中编辑的用户信息。用户名是不可变的,但应该出现在表单中,以便用户知道他们正在编辑哪个用户。密码只能编辑。所以在我的 colModel 我有这样的设置:
{name:'username', index:'username', width:155, editable:true, editoptions: {readonly:'readonly'}},
{name:'password', index:'password', width:155, hidden:true, editable: true, edittype:'password', editrules:{edithidden:true}},
这适用于编辑。我的问题是添加我需要将用户名设置为“非只读”。我没有看到控制添加表单和编辑表单的属性。也许我可以使用afterShowForm 事件来更改编辑选项?有人做过这样的事吗?
【问题讨论】: