Multi Level Sorting
Multi Level Sorting
I have a table with four columns with class name, student name, subject name, marks.
[code]
Class | Student Name | Subject Name | Marks
Class1 | | | 30
| Student 1 | | 20
| Sub 1 | 10
| Sub 2 | 10
| Student 2 | | 10
| | Sub 1 | 10
[/code]
First Row corresponds to the class name. Each class has multiple students and then each student in turn can have multiple subjects. I want to sort down this table on the basis of no of marks so that each class which has max no of total marks for all students should be at top and then each of the students within that class should be sorted on the basis of their individual marks and in turn for each student his subjects should be sorted on the basis of no of marks scored in that subject.
I have looked at this example http://datatables.net/forums/comments.php?DiscussionID=4866&page=1#Item_0
But this works for two columns whereas I have a hierarchy. Can anyone one please help me with this?
Thanks,
Neha
[code]
Class | Student Name | Subject Name | Marks
Class1 | | | 30
| Student 1 | | 20
| Sub 1 | 10
| Sub 2 | 10
| Student 2 | | 10
| | Sub 1 | 10
[/code]
First Row corresponds to the class name. Each class has multiple students and then each student in turn can have multiple subjects. I want to sort down this table on the basis of no of marks so that each class which has max no of total marks for all students should be at top and then each of the students within that class should be sorted on the basis of their individual marks and in turn for each student his subjects should be sorted on the basis of no of marks scored in that subject.
I have looked at this example http://datatables.net/forums/comments.php?DiscussionID=4866&page=1#Item_0
But this works for two columns whereas I have a hierarchy. Can anyone one please help me with this?
Thanks,
Neha
This discussion has been closed.