Datatable Themeroller (DIY Project Download)

datatable themeroller 1

To have your table styles integrate with jQuery UI’s ThemeRoller styles, simply include the DataTables CSS and JS integration files for jQuery UI, as shown in this example. This holes true for all widgets, and the jQuery UI team have addressed this issue by introducing themes through their excellent ThemeRoller. DataTables has full support for ThemeRoller created themes, all you need to do is enable the bJQueryUI flag in the initialisation object, and the required mark-up and classes will be added by DataTables. DataTables augments the ThemeRoller provided CSS with information for styling the DataTables enhanced tables since ThemeRoller does not provide this information, and as such, you can use the same styling classes as with the default DataTables CSS.

datatable themeroller 2Although Bootstrap, Foundation and other libraries require a plug-in, jQuery UI ThemeRoller support is built into DataTables and can be enabled simply with this parameter. I’m not aware of anything in ThemeRoller which provides that. I am using the themeroller style called smoothness on a table. For some reason the column header text disappears when I view the table in IE7.

Here’s my first attempt at styling a DataTables table using JQuery-Mobile styles. We modified it to provide many dataTables features: dataTools, ColReorder, FixedColumns, ColVis,. Datatables enhancements (state safe, drupal.behavior for javascript in the datatable, themeroller support, different pagers,. ColVis will automatically add the classes required for theming with jQuery UI ThemeRoller when enabled in DataTables. This example also shows a slightly altered position for the ColVis button from the other example, in that it is included in the table toolbar.

Jqueryui

You can bind almost any type of DataTable, DataView, DataSet, IEnumerable, ICollection, List collections to jqGrid. Runtime collections and tables can be bound using the jqGrid DataSource property and then calling DataBind(). Has anyone tried to get scoped themeroller css working with Datatables? I’ve looked it over but I’m not really sure where to begin. This holds true for all widgets, and the jQuery UI team have addressed this issue by introducing themes through their excellent ThemeRoller. DataTables has full support for ThemeRoller created themes, all you need to do is enable the bJQueryUI flag in the initialisation object, and the required mark-up and classes will be added by DataTables. PrimeFaces is using jQuery ThemeRoller framework, and it comes with 30+ pre-defined themes, visit all available themes, before create a custom theme. I applied the above to p:dataTable with paginator as below.

Using Datatables With Themeroller Mobile Styles