|
Overview
IntroductionJQuery Datatables RowGrouping add-in is a additional plugin for the DataTables plugin. It enables you to easily handle grouping operations on the client side. This plugin is extension of the examle placed on the DataTables site with several additional options. DetailsRowGrouping plugin enchances datatables so you will need to apply this plugin on the table where datatables plugin is already applied. Example of the initialization code is:
$("#myTable").dataTable().rowGrouping();
This line of code group rows in the table by the first column. There are several stragegies that can be used for grouping (e.g. group by letters, year etc) - you can see details in the GroupingTypes page. OptionsRowGrouping plugin can be customized if you pass various options to the initialization code. Example of the customization using a plugin parameters is shown in the following example:
$("#myTable").dataTable().rowGrouping({iGroupingColumnIndex:5});
Using this line of code, row grouping will not be done by the first column - column 5 will be used instead. See more datails about plugin options on the Options page ExamplesThere are lot of examples of row groung usage, You can either download them from the http://code.google.com/p/jquery-datatables-row-grouping/downloads/list or you can see following online examples:
|
How can I disable rowGrouping? I'd like to be able to switch back and forth between grouped and un-grouped views, without having to re-initialize the dataTable each time.