在我的 jsGrid 配置中,我调用了editItem
这样的函数:
editItem: function(item) {
var $row = this.rowByItem(item);
if ($row.length) {
console.log('$row: '+JSON.stringify($row));
this._editRow($row);
}
},
在console.log
,我得到结果:
{
"0": {
"jQuery223061031009408811742": {
"JSGridItem": {
"myColumn1": "AB",
"myColumn2": "BC",
"myColumn3": "CD",
}
},
"jQuery223061031009408811741": {
"events": {
"click": [
{
"type": "click",
"origType": "click",
"guid": 67,
"namespace": ""
}
],
"dblclick": [
{
"type": "dblclick",
"origType": "dblclick",
"guid": 68,
"namespace": ""
}
],
"mouseover": [
{
"type": "mouseover",
"origType": "mouseenter",
"data": null,
"guid": 69,
"namespace": ""
}
],
"mouseout": [
{
"type": "mouseout",
"origType": "mouseleave",
"data": null,
"guid": 70,
"namespace": ""
}
]
}
}
},
"selector": "",
"context": {},
"length": 1
}
我真正的领域在里面jQuery223061031009408811742 -> JSGridItem
如何在 jsGrid 中使用函数获取这些值?或者 JSON 中有内置函数可以解决这个问题?
注意:jQuery223061031009408811742
每次页面重新加载时字段总是会改变,所以我不能硬编码字段名称来调用它。