值如何在jqGrid的如何顯示在jqGrid的
我JS網格中顯示的鍵值對的值,
var source = {
localdata: vm.courseApplications,
datatype: 'array',
datafields:
[
{
name: 'course.course_specialization.value',
type: 'string'
},
{
name: 'subject_category',
type: 'string'
},
],
id: '_id'
};
$scope.display_rows = vm.courseApplications.length;
var dataAdapter = new $.jqx.dataAdapter(source);
columns: [
{
text: '', sortable: false, filterable: false, editable: false,
groupable: false, draggable: false, resizable: false,
datafield: '', columntype: 'number', width: 50,
cellsrenderer: function (row, column, value) {
return '<div class="jqxgridmargintop text-center">' + (value + 1) + '</div>';
}
},
{
text: 'Course Specialization',
datafield: 'course.course_specialization.value',
groupable: true,
editable: false,
cellsrenderer: vm.courseApplicationIdRender
}, {
text: 'Subject Category',
datafield: 'subject_category.value',
width: '10%',
groupable: false,
editable: false
},
],
,我沒有得到在網格中顯示的任何值(顯示爲空值)。任何人都可以請建議help.Thanks。
u能顯示你想如何顯示 –