http://www.jeasyui.com/documentation/index.php#editor
datagrid中的Editor
Editor功能:支持行内编辑、修改列参数。
每个Editor支持如下方法:
方法 | 参数 | 说明 |
init | container, options | 初始化editor并返还目标对象 |
destroy | target | 销毁editor |
getValue | target | 从editor text中读取值 |
setValue | target , value | 设置editor值 |
resize | target , width | 调整editor大小 |
datagrid支持的Editor方法:
方法 | 参数 | 说明 |
getEditors | index | 获取一行(index)中所有Editors,返回一个Editor数组。 每个editor有如下属性: actions: 该editor支持的操作(同上表) target: 目标editor的jQuery对象 field: 该列的field值 type: editor 类型,比如 'text','combobox','datebox'。 |
getEditor | options | 获取一行(index)中指定field的Editor,返回一个Editor对象。 index: 行索引值. 例子: // get the datebox editor and change its value var ed = $('#dg').datagrid('getEditor', {index:1,field:'birthday'}); $(ed.target).datebox('setValue', '5/4/2012'); |