Capturing sort event on table heading
Capturing sort event on table heading
Hi,
Is there any ellegant way to attach listener to the sort event on the heading cell - more elegant than
$("thead td").click(function() {} );
I'm using some sort of grouping and I put fixed sorting desc on grouped column and user can sort other columns but the grouped column will always be sorted first. However I have not hide this column and I would like to enable user to change asc/desc ordering of the grouping column, and I canot capture column sort event.
Example is on the http://jquery-datatables-row-grouping.googlecode.com/svn/trunk/letters.html third column is grouped by the first letter.
I have added function as a $.fn.dataTableExt.afnSortData function but this is called for each row (or I'm wrong)
fnSortListener also does not work for me because I do not have external element whhere I want to attach event handler I want to capture click on the exisitng table heading cell.
Thanks,
Jovan
Is there any ellegant way to attach listener to the sort event on the heading cell - more elegant than
$("thead td").click(function() {} );
I'm using some sort of grouping and I put fixed sorting desc on grouped column and user can sort other columns but the grouped column will always be sorted first. However I have not hide this column and I would like to enable user to change asc/desc ordering of the grouping column, and I canot capture column sort event.
Example is on the http://jquery-datatables-row-grouping.googlecode.com/svn/trunk/letters.html third column is grouped by the first letter.
I have added function as a $.fn.dataTableExt.afnSortData function but this is called for each row (or I'm wrong)
fnSortListener also does not work for me because I do not have external element whhere I want to attach event handler I want to capture click on the exisitng table heading cell.
Thanks,
Jovan
This discussion has been closed.
Replies
Allan