EasyUI 相关

根据关键字值取行

var rowIndex = $('#tt').datagrid('getRowIndex', id);//id是关键字值

var data = $('#tt').datagrid('getData').rows[rowIndex];

var oname = data.operator;//operator是属性值

datagrid editor 日期格式

<table id="dg2" class="easyui-datagrid" style="100%;"
    idfield="detailinvid" toolbar="#ltb" rownumbers="true" nowarp="false" singleSelect="true" iconCls="icon-save" nowrap="false">
    <thead>
        <tr>
            <th data-options="field:'invname',100">名称</th>
            <th data-options="field:'require',150">要求</th>
            <th data-options="field:'unit',80" editor="{type:'textbox'}" >单位</th>
            <th data-options="field:'detailqty',70">数量</th>
            <th data-options="field:'requiredate',100 " editor="{type:'datebox',options: { editable: false,formatter:myformatter,parser:myparser}}">要求完工日期</th>
            <th data-options="field:'memo',90" editor="{type:'textbox'}">备注</th>
            <th data-options="field:'detailinvid',hidden:'true'"></th>
            <c:if test="${isview=='0'}">
                <th data-options="field:'operupd',100" align="center"
                    formatter="formatAction">操作</th>
            </c:if>
        </tr>
    </thead>
</table>
原文地址:https://www.cnblogs.com/remember-forget/p/6061480.html