0
如何在JQGrid的編輯/搜索字段中設置默認值(使用MVC版本)?JQGrid的MVC版本:設置編輯區域的默認值(下拉框,文本和複選框)
如何在JQGrid的編輯/搜索字段中設置默認值(使用MVC版本)?JQGrid的MVC版本:設置編輯區域的默認值(下拉框,文本和複選框)
設置默認爲下拉
new JQGridColumn
{
DataField = "myField",
DataType = typeof(string),
Editable = true,
EditType = EditType.DropDown,
EditFieldAttributes = new List<JQGridEditFieldAttribute>()
{
new JQGridEditFieldAttribute(){ Name = "defaultValue", Value = "myDefaultValue"},
},
},
默認設置爲文本框
new JQGridColumn
{
DataField = "myField",
DataType = typeof(string),
Editable = true,
EditFieldAttributes = new List<JQGridEditFieldAttribute>()
{
new JQGridEditFieldAttribute(){ Name = "value", Value = "myDefaultValue"},
},
},
違約複選框選中
new JQGridColumn
{
DataField = "myField",
DataType = typeof(bool),
Editable = true,
EditType.CheckBox,
EditFieldAttributes = new List<JQGridEditFieldAttribute>()
{
new JQGridEditFieldAttribute(){ Name = "checked", Value = "checked"},
},
},