user1791567
user1791567

Reputation: 1428

YUI3 Datatable - Drag and Drop columns, function getTbodyEl does not exist

I'm wondering how can I make the order of the columns sortable in a YUI 3 Datatable.

Following an example where rows are sortable I found that I have to create an instance of Y.DD to each row. Trying to do the same with columns, but the function getTbodyEl() does not exist.

Has anyone accomplished this? Help is appreciated

Upvotes: 1

Views: 467

Answers (1)

Jonas G. Drange
Jonas G. Drange

Reputation: 8845

Y.DD is Drag and Drop. This would help only if you want to drag the columns to sort them.

This is one way of programmatically sorting the columns.

I haven't read the documentation for Y.DataTable, but you can sort the columns attribute, subscribe to the columnsChange event and then make the datatable re-render*.

Upvotes: 1

Related Questions