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?
|