This is a migrated thread and some comments may be shown as answers.

grid Sort event

1 Answer 25 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Haim
Top achievements
Rank 1
Haim asked on 10 Dec 2013, 12:06 PM
hello 

i new with kendo ui and i testing it for my new project, I use  the grid and i have column with ip range, and i get the results dynamic from the server.
when i press on the header of the IP column  the grid sorted, but when a new result arrived it doesnt sort as it should be, 
and second how can i override the sort method so i get the ip in order as numbers "10.0.1.1, 10.0.1.2, 10.0.1.10" instead of string "10.0.1.1, 10.0.1.10, 10.0.1.2"

Thanks 

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 10 Dec 2013, 12:55 PM
Hi Haim,


You could use the sort configuration of the Grid's dataSource to set the initial sorting that will be applied.

Regarding the second question, yes you could specify a custom compare function for the column, containing the IPs. Here is a similar JS Bin example, which demonstrates number sorting by name.

I hope this information helps.

Regards,
Dimiter Madjarov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Haim
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or