Identify sortable columns in JQueryUI markup #17

Closed
Tobion opened this Issue Jul 17, 2011 · 2 comments

Comments

Projects
None yet
2 participants
@Tobion

Tobion commented Jul 17, 2011

I switched from standard markup to JQueryUI DataTable markup. But I recognized there is no way to identify the columns that are sortable. With the standard markup you apply the classes "sorting", "sorting_asc" etc. to the relevant columns. This way I can for example specify cursor: pointer for sortable columns. But there is no such class in JQueryUI markup.
Please add a class like "sortable" to these columns.

@DataTables

This comment has been minimized.

Show comment Hide comment
@DataTables

DataTables Jul 17, 2011

Owner

When enabling the jQuery UI option in DataTables it applies the sorting class information to the 'span' element which is used for the jQuery UI supplied icon - so the information is there, but not particularly useful if you want to style the header cell as a whole using CSS. I will certainly take a look at adding this into the next major version of DataTables, which will see a good tidy up of all the CSS classes that are using. Thanks for the suggestion - nice one.

Owner

DataTables commented Jul 17, 2011

When enabling the jQuery UI option in DataTables it applies the sorting class information to the 'span' element which is used for the jQuery UI supplied icon - so the information is there, but not particularly useful if you want to style the header cell as a whole using CSS. I will certainly take a look at adding this into the next major version of DataTables, which will see a good tidy up of all the CSS classes that are using. Thanks for the suggestion - nice one.

DataTables added a commit that referenced this issue Jun 19, 2013

New: jQuery UI integration now has the sorting_* classes applied to it
for the header cells (matching the standard case, in addition to the
ui-state-default class for styling).

- This allows the developer to add styling information based on the
  sorting state of the cell.

- This fixed issue #17
@DataTables

This comment has been minimized.

Show comment Hide comment
@DataTables

DataTables Jun 19, 2013

Owner

I should have done this a long time ago! However, it is now done in commit 3827b96 :-).

Owner

DataTables commented Jun 19, 2013

I should have done this a long time ago! However, it is now done in commit 3827b96 :-).

@DataTables DataTables closed this Jun 19, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment