Data Demarcation?
Data Demarcation?
When a column is sorted, I am looking for a way to demarcate that column's data. For example if the numbers in the sorted column are [1,1,1, 2,3,4,4,6] the following # columns would have a different style/font [1#,1, 1, 2#, 4#, 4, 6#]. Likewise to do the same with dates, for a new day I would want to display it differently, the rest of same days in the sorted columns would be displayed as normal. Is there a way to do this using DataTables? Thanks for reading.
This question has an accepted answers - jump to answer
Answers
Its definitely possible. One option is to use the RowGroup extension.
Changing
1
to1#
might not work well as it is updating the cell data. You can highlight the first cell using color. See this example:http://live.datatables.net/nidirora/1/edit
Note the CSS I added in the CSS tab to apply the CSS to the Datatables cells.
The following API's and options are used in the example:
order()
rows().every()
row().node()
rowCallback
order
The
selector-modifier
of{page: 'current'}
is used to keep the loop to just the rows displayed.Kevin