我是Kogrid的新手。默认情况下,我的网格按UserRoles列分组。但它默认显示已折叠。我希望在页面加载时通过UserRoles列对我的网格进行分组和扩展。
<div id="rolesGrid" data-bind="koGrid:rolesGridOptions"></div>
JS:
this.rolesGrid = ko.observableArray([]);
this.rolesGridCols = [
{ field: 'UserRole', displayName: 'User Role', width: '*'},
{ field: 'UserName', displayName: 'User Name', width: '*' },
{ field: 'AssignedBy', displayName: 'Assigned By',width: '*' }
];
this.rolesGridOptions = {
data: this.rolesGrid,
columnDefs: this.rolesGridCols,
groups: ['UserRole'],
showGroupPanel: false,
};
};