Set order when using rowGroup
Set order when using rowGroup
glimpsed_chaos
Posts: 140Questions: 30Answers: 4
Trying to determine how to maintain order when using row grouping.
My table renders fine with the intended grouping. My datasource (SQL Query orders the data before passing) back as well as my order setting during table initialization. However, when rendered the column that I group by is out of order.
I would like to keep the setting "order: [[0, 'asc']]" when rendered.
data: data,
order: [[0, 'asc']],
ordering: false,
lengthChange: false,
info: false,
paging: true,
deferRender: true,
scrollY: 600,
scroller: true,
autoWidth: false,
columns: [
{ "data": "teamname", "width": "15%" },
{ "data": "oncalltitle", "width": "10%" },
{ "data": "displayname", "width": "18%" },
{ "data": "phone", "width": "15%" },
{ "data": "emailaddress", "width": "8%" },
],
columnDefs: [
{
targets: [0,4],
visible: false
}
],
rowGroup: {
dataSrc: 'teamname'
}
This discussion has been closed.
Answers
Disregard. I run 2 SQL Queries, the initial one determines a qualifier for the 2nd query. The 1st one was not ordered.
I should have checked that.