How can we have letter and name grouping for a single column using rowGrouping plug-in and jQuery DataTables?
Eg: For values:
aaa=>1,aaa=>2,aaa=>3,aab=>1,aab=>2,aab=>3,aac=>1,aac=>2,...
should group (sGroupBy
) with letter A
, B
, then with name aaa
, aab
, aac
.
Plug-in rowGrouping is no longer being developed, I would not recommend using it. Use alternative way to perform row grouping as shown in Row grouping example.
For example, use the code below to group rows by first letter when sorted by column containing names.
See this jsFiddle for code and demonstration.