嘿伙计们,所以我的数据看起来像:
时间表数据
[
{ID:2, Name:QXC, Items:[{Status:1, Hours: 8},{Status:1, Hours: 4}]},
{ID:5, Name:ABC, Items:[{Status:1, Hours: 6},{Status:1, Hours: 0}]}
]
我的网格看起来像:
jQuery("#rowed5").jqGrid({
data: timeSheetData,
datatype: "local",
height: 250,
colNames:['ID','Name','Monday','Tuesday'],
colModel:[
{name:'ContractID', index:'ContractID', jsonmap:'?????', width:200, editable:false, sortable:false},
{name:'EmployeeName', index:'EmployeeName', jsonmap:'?????'' ,width:200, editable:false, sortable:false},
{name:'Monday', index:'Monday', jsonmap:'?????', width:200, editable:false, sortable:false},
{name:'Tuesday', index:'Tuesday'jsonmap:'?????'jsonmap:'timeSheetRow1.timeSheetItem2.WorkedHours', width:200, editable:false, sortable:false}
],
caption: "Input Types",
jsonReader: {repeatItems: false, root: "timeSheetRow1"}
});
我很感兴趣我需要用什么来代替??????在我的 jqgrid 表中获取以下两行:
2, QXC, 8, 4
5, ABC, 6, 0
提前谢谢!