Pagination on none standard table.
Pagination on none standard table.
In the application I am developing I have a timetable displaying classes. Since I do not want to repeat the day, I display the timetable like this:
time
duration
activity
level
location
{{oldday=None}}
{{for activity in timetable:}}
{{if activity.day.day!=oldday:}}
{{=activity.day.day}}
{{oldday=activity.day.day}}
{{pass}}
{{=activity.timetable.time.strftime('%H:%M')}}
{{=activity.timetable.duration}}
{{=activity.timetable.activity}}
{{=activity.level.level}}
{{=activity.timetable.location}}
{{pass}}
The problem is that some fitness and health clubs have timetables with more than 100 classes, I would like to use dataTables' pagination feature, however, since my table doesn't have the right format I do not know how to implement this.
Kind regards,
Annet.
time
duration
activity
level
location
{{oldday=None}}
{{for activity in timetable:}}
{{if activity.day.day!=oldday:}}
{{=activity.day.day}}
{{oldday=activity.day.day}}
{{pass}}
{{=activity.timetable.time.strftime('%H:%M')}}
{{=activity.timetable.duration}}
{{=activity.timetable.activity}}
{{=activity.level.level}}
{{=activity.timetable.location}}
{{pass}}
The problem is that some fitness and health clubs have timetables with more than 100 classes, I would like to use dataTables' pagination feature, however, since my table doesn't have the right format I do not know how to implement this.
Kind regards,
Annet.
This discussion has been closed.
Replies
I'm sorry to say that DataTables doesn't support colspan. The closest is in m row grouping example: http://datatables.net/1.5-beta/examples/advanced_init/row_grouping.html - which might be what yo are looking for? But you will need to change the HTML a little bit...
The reason for the lack of colspan support is that it makes sorting and filtering very much a non-trivial exercise, particularly when you include row grouping.
Hopefully the example above will help though!
Regards,
Allan
I had a look at the row grouping example, it comes pretty close to what I need. Thanks.
Kind regards,
Annet.