sorting a grid

i put some data in a grid, like this 7 10 11 5 3 7 i try to sort the data by clicking on the first column and the data go on the last rows of the grid. how should i sort only the three rows that have the data? sorry for my unknowledgement and thanks for any help PP

7 Replies

AD Administrator Syncfusion Team February 24, 2006 06:24 AM UTC

Hi, This can be achevied, by having own IComparer object and passing it when you call grid.Model.Data.SortByCol method to do the sort. Here is a sample project Best Regards, Madhan.


PP PLIACHAS PASCHALIS February 24, 2006 11:06 AM UTC

Thanks for your reply. unfortunatelly i am not familliar in C#. i could prefer the code of the NewComparer class to be tin Vb net. Thanks any way PP >Hi, > > This can be achevied, by having own IComparer object and passing it when you call grid.Model.Data.SortByCol method to do the sort. >Here is a sample project > >Best Regards, >Madhan.


AD Administrator Syncfusion Team February 24, 2006 03:16 PM UTC

Hi Pliachas, Here is a sample project on VB. Kindly, try it let us know if it helps Best Regards, Madhan.


PP PLIACHAS PASCHALIS February 24, 2006 08:15 PM UTC

Thanks for response i''ll try that and i''ll let you know. PP >Hi Pliachas, > >Here is a sample project on VB. Kindly, try it let us know if it helps > >Best Regards, >Madhan.


PP PLIACHAS PASCHALIS February 24, 2006 08:26 PM UTC

Ok it works but how should i extend the sorting for strings that should be on the third column or fo dates also. Thanks for help anyway. PP >Thanks for response i''ll try that and i''ll let you know. >PP > >>Hi Pliachas, >> >>Here is a sample project on VB. Kindly, try it let us know if it helps >> >>Best Regards, >>Madhan.


AD Administrator Syncfusion Team February 25, 2006 06:22 AM UTC

Hi Pliachas, Here is a sample project, implementing Icomparer for sorting of integers, strings and DateTime datatypes. Let us know if you need further assistance, Best Regards, Madhan.


PP PLIACHAS PASCHALIS February 25, 2006 03:56 PM UTC

well i get an error at Integer.TryParse where the vb language tells me that the tryparse isn''t a member of integer. I'' ll try to fix it. Thanks for your help. PP

Loader.
Up arrow icon