multi-Level RowGroup
multi-Level RowGroup

i am working with multi level rowgroup and i want to know if i can order other column without broke the regroup,
i look at the exmple, but in my case its not working.
This discussion has been closed.
i am working with multi level rowgroup and i want to know if i can order other column without broke the regroup,
i look at the exmple, but in my case its not working.
Answers
Are you asking if you can order the columns within a group? If so It seems to work here:
http://live.datatables.net/kijobine/1/edit
Took this example and included the non-rowGroup Names column to be ordered.
If this doesn't help then please post a link to your page or a test case (update mine) to show the issue.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
yes but also in this example when you order the name group all the regroup are Split and not stick together
Are you saying the problem is when you click on the column to change the order? If so then use
orderFixed
. Here is the updated example where you can order by clicking on the columns:http://live.datatables.net/huhacibu/1/edit
Kevin
Also you can look at this example:
https://datatables.net/extensions/rowgroup/examples/initialisation/fixedOrdering.html
Kevin
hey Kevin i look also in this example, this good
but in my case its not order any column on click
That is something we would need to see to help diagnose. Can you post a link to your page or a test case replicating the issue?
Look at the browser's console for errors.
Is a particular column that doesn't sort?
Does the table sort correctly without RowGroup?
Kevin
hey kelvin
the table sort correctly without and with the rowgroup
only when i used fixedOrder the other column didnt sort
there are no errors in console
this is my code for the datatable
I see you are using server side processing. In this case the server script is responsible for sorting the table. You server script will need to take into consideration the row groups and sort the other columns accordingly and return the rows for the page displayed.
Kevin
ok kevin , do you have exmple?
this is the sorting code on serverside
You would need that
fixedOrder
logic to also be in the server-side sorting algorithm. I don't have an example though, I'm afraid.i try many options but no one has work, i cant find a way to make it work
Fixed order is prefixed onto the order that is sent to the server automatically, so there shouldn't be any special handling required on the server-side, as long as it is capable of doing multi-column sorting. Is it?
Also keep in mind that with row grouping enabled it will sort by the grouped column(s) first - then apply the user sort inside that (assuming you use
fixedOrder
as Colin and Kevin have suggested).To see that in action take this example - click on the "Position" column - you will see that it sorted inside the groups based on the position value, but the grouping (office) still takes sorting priority.
Regards,
Allan
i dont think so, what happen now is the i get the column and the order of column(asc,desc)
and then make this before return the json