我有一个koGrid,配置如下:
var myItemsGrid = {
data: myItems,
columnDefs: [
{ field: 'item.title', displayName: 'Title', cellTemplate: $("#cdfUrlCellTemplate").html() },
{ field: 'item.dueTimeUtc', displayName: 'Due', cellFormatter: formatDate, sortFn: sortDates },
{ field: 'id', displayName: 'Edit', cellTemplate: $("#editCellTemplate").html() }
],
showGroupPanel: true,
groups: ['item.title'],
showFilter: false,
canSelectRows: false
};我的问题是,使用网格中某个字段的字段名填充组数组会导致以下错误:
TypeError:无法读取未定义的属性“isAggCol”
如何填充组数组,以便为网格设置初始分组?
发布于 2013-08-09 22:25:31
最后,我不得不对koGrid脚本进行修补,以使初始的列分组工作。
如果其他人有这个问题,我很乐意提供补丁脚本。我将考虑发出一个拉请求,在koGrid存储库中进行更多的操作之后,将修复程序导入它。
发布于 2013-09-17 16:08:15
我也遇到了同样的问题,并采取了不同的方法,将一个事件发送到网格控件,按第一个标题分组。就像这样:
jQuery("#symbolPickerView").find(".kgGroupIcon").first().click();
这是可行的,直到有某种类型的修补程序普遍可用。
https://stackoverflow.com/questions/18124616
复制相似问题