PDA

View Full Version : grid column sorting



prakashkadakol
16 May 2012, 5:30 AM
hi

I have grid which have multiple columns,one column have numeric row values for that ascending and descending
sorting is working fine,But am updating that column values into some string constants after that sorting asceding descending not working,any thoughts on this????
before changing all column values are numeric after changing column values are string.

Romick
16 May 2012, 6:08 AM
Can you give us short test case? I suppose, you have problem with defining model field.

prakashkadakol
17 May 2012, 1:32 AM
by default the sort type for the column is integer but am dynamically changing column values to string,so on run time on call of ascend and descend it checks for integer value but its string so NAN is returning so its not sorting.
So how i can change particular column sortType to string dynamically.

Romick
17 May 2012, 1:46 AM
Any peace of code?

sword-it
17 May 2012, 3:35 AM
Hi

I think you should create a sort function for this.For reference you can check this link given below.
http://www.sencha.com/forum/showthread.php?135228-Custom-Sorting-for-columns-in-gridpanel

prakashkadakol
17 May 2012, 7:33 AM
applied this.panel.store.data.sortType = function(v){} now its working.thanks for every ones suggestions.