easyUI中PropertyGrid 设置不可编辑

以前我看到easyUI中这样一句话

type: string, the edit type, possible type is: text,textarea,checkbox,numberbox,validatebox,datebox,combobox,combotree.

于是我将type设置为type:"label"来实现行不可编辑,结果是,每次点击不可编辑行,确实不编辑,但是调试页面会报错,故改之。


easyUI中PropertyGrid继承于datagrid,在官网中,又有这样的一句话

Defines the editor when editing a row.

所以设置PropertyGrid的行不可编辑正确的写法是,却掉editor,如下SSN行不可编辑

  1. {"total":4,"rows":[
  2. {"name":"Name","value":"Bill Smith","group":"ID Settings","editor":"text"},
  3. {"name":"Address","value":"","group":"ID Settings","editor":"text"},
  4. {"name":"SSN","value":"123-456-7890","group":"ID Settings"},
  5. {"name":"Email","value":"[email protected]","group":"Marketing Settings","editor":{
  6. "type":"validatebox",
  7. "options":{
  8. "validType":"email"
  9. }
  10. }}
  11. ]}


你可能感兴趣的:(js,easyUI)