javascript - How to get the data of the selected row in the onClickCell method of the DataGrid form in EasyUI?
怪我咯
怪我咯 2017-06-12 09:32:37
0
1
881
            onClickCell: function (rowIndex, field, value) { //在用户点击一个单元格的时候触发。
                var row = $("#dataList").datagrid("getSelected", rowIndex);//这样获取不行,必须先在表单的那一行勾上,才行
                alert(row.State);
                if (his != 1) {           //查看历史记录时无法添加
                    if (field == "AddShLrbl") {
                        $('#dataList').datagrid("beginEdit", rowIndex);
                    }
                    else {
                        $('#dataList').datagrid('endEdit', rowIndex);
                    }
                }
            }
怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(1)
代言

I have found the answer in the blog garden, let me share it with you here,
onDblClickCell: function (rowIndex, field, value) {
var rows = $('#dataGrid').datagrid('getRows');
var row = rows[rowIndex];
var id = row.id;
}

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template