rowGroup startRender using level augment
rowGroup startRender using level augment
bbrindza
Posts: 316Questions: 73Answers: 1
I need to get the row count for the second level rowGroup using the new level augment in version 1.10. I could not find any examples on how to use this on the web or on DataTables site.
rowGroup: {
dataSrc: [ 'time_log_year', 'employee_full_name'],
startRender: function ( rows, group, level ) {
return group +' ('+rows.count()+' rows)';
}
},
I also need to count all rows for the second level not just for each page. (see images below)
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
The
rowGroup.startRender
docs state thelevel
parameter is used to indicate the group level with the first level being 0. An if statement can be used to return different strings.The example in this thread shows one way to sum the group's total across multiple pages. You should be able to use the same technique to get the row count.
Kevin
Kevin, I did seen the document regarding the level argument , however I am trying to figure out how to use this in my startRender function.
What is the syntax?
Didn't test it but something like this:
Kevin
That what I was looking for .
Thank You Kevin!