XTRUST.ORG
XTRUST.ORG

Reputation: 3392

Mootools sortable table

I have a sortable mootools table and would like to create one or two header columns unsortable. How can I do this. My code below:

var myTable = new HtmlTable({
    properties: {border: 0,  cellspacing: 0},
    headers: ['Column1', 'Column2', 'Column3', 'Column4'],
    rows: [],
    zebra: true,
    sortable: true
});

myTable.inject($('column2'));
myTable.sort(0);

I would like to sort only 'Column1' and 'Column2'.

Upvotes: 1

Views: 962

Answers (1)

lorenzo-s
lorenzo-s

Reputation: 17010

Try to set "table-th-nosort" class to your table header cell:

<th class="table-th-nosort">Not sortable</th>

Have a look to HtmlTable.Sort reference for classNoSort option.

Upvotes: 2

Related Questions