Title: datagrid won't group Post by: gib65 on June 15, 2017, 12:11:27 PM Hello,
I'm trying to implement group on my DataGrid but it's not working. Here's my html: <div> <table id="easyuiDataGrid" style="width: 800px;"></table> </div> Here's my javascript: $('#easyuiDataGrid').datagrid({ columns: [[ { field: 'label', width: 200 }, { field: 'value', width: 500, }, { field: 'rank', width: 100 } ]], data: [ { label: '<b>1st Safeguard</b>', value: 'BPCS-CF-AAH-601B...', rank: 3}, { label: '<b>2nd Safeguard</b>', value: 'ROUND - Daily lab rounds.', rank: 2}, { label: '<b>1st Safeguard</b>', value: 'Other - Methanol injection...', rank: 1}, { label: '<b>2nd Safeguard</b>', value: 'BPCS - CF-AAH-601B...', rank: 1 }, { label: '<b>1st Safeguard</b>', value: 'ROUND - Daily lab rounds.', rank: 2 }, { label: '<b>2nd Safeguard</b>', value: 'Other - Methanol injection...', rank: 3 }, ], fitColumns: true, groupField: 'label', view: groupview }); If I take out "view: groupview" the grid doesn't group. If I leave it in, the grid doesn't render. I'm not sure what view or groupview is or why it's necessary. Can anyone see the problem? Title: Re: datagrid won't group Post by: stworthy on June 16, 2017, 04:20:13 AM Please look at this example https://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=default&dir=ltr&pitem=Group%20Rows%20in%20DataGrid&sort=
Title: Re: datagrid won't group Post by: gib65 on June 16, 2017, 07:42:39 AM That works perfectly. Not sure why I wasn't able to get it to work before. Will customize this grid and see if I can make it do what I want. Thanks.
|