DataViewsJS supports themes by importing the theme file within the application. User can select the built-in-theme, jQuery UI theme, Bootstrap theme or use a customized theme.
For built-in themes, CSS files are divided into two parts.
Note:
For jQuery UI and Bootstrap theme, Grid uses another CSS file to update the appearance and corresponding class name gets mounted on DOM element.
However for User Customized theme, customize the theme-css files to update their styles as required and load in the correct sequence.
Use the following steps to enable different themes:
<link rel="stylesheet" type="text/css" href="[Your stylesheet path]/gc.dataviews.bootstrap.min.css" />
$('#grid-theme-mode').change(function () {
var sel = document.getElementById('grid-theme-mode');
var value = sel.options[sel.selectedIndex].value;
var baseUrl = '[Your Stylesheet Path]/gc.dataviews.' + value + '.min.css';
getCSS(baseUrl, function () {
initGrid(sourceData);
currentCss = value;
});
});
Submit and view feedback for