Passing CSS classes in JSON?
Passing CSS classes in JSON?
I have an application where I believe deferred loading will be best (show 1-25 with the initial html and rendering, then the other 2000+ rows via AJAX)... but one column has a class name to color a positive number green, negative number red and 0 to yellow (this value is a change since earlier so JS alone won't work).
I need a way to format my JSON so that I can insert a class name for a field in the reply.. is there a way to do this?
I need a way to format my JSON so that I can insert a class name for a field in the reply.. is there a way to do this?
This discussion has been closed.
Replies
http://beta.anonpa.com/planets
JSON @ http://beta.anonpa.com/index/planets/format/json
Deferred loading, looks fine but messes up once I page or search...
There isn't a built in way to do this in DataTables (i.e. there is no way to target a class at an individual cell using only JSON), but it is perfectly possible to use fnRowCallback to do this, and possibly mDataProp to make life easier when accessing properties ( http://datatables.net/blog/Extended_data_source_options_with_DataTables ).
Allan