| Page 1 of 1 | [ 3 posts ] |
|
I have a datatable with column that im sorting first alphabeticaly then when user clicks on a button i want it to be sort numericaly how can i do this , i can't set parser: number because my datatable with it's datasource is already created and rendered .
any ideas ? Thanks. |
|
You will have to define your own sort function as shown here:
http://developer.yahoo.com/yui/datatable/#advancedsort Your sort function should check what type of sort is required and proceed accordingly. You would have to force (type cast) your values into the desired data type to make it work. |
|
Thanks for the response satyam ,
I can't use the column definition as in that example because i already have my datatable created , i was hoping that there's a way to change a sortfunction after the datatable has been displayed , like setting the datatable's attribute sortFunction and maybe refresh the datatable or requery it afterwards. is this possible ? Thanks. |
| Page 1 of 1 | [ 3 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group