Domanda

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

È stato utile?

Soluzione

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*.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top