We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

sorting a table

Hello, I have 1 question : Can I sort a table without to give a letter. In in sample I have to give the letter "B", but I want sort from A to Z or from 1... to 9...? How I have to take the add-function? regards A.M. (Berlin)

3 Replies

AD Administrator Syncfusion Team April 12, 2005 07:49 AM

Hi Andreas, Are you referring to the AlphabeticalPaging sample in the ASP.NET version of Essential Grid? In that sample you can sort by: this.GridGroupingControl1.TableDescriptor.SortedColumns.Add("ContactName"); or this.GridGroupingControl1.TableDescriptor.SortedColumns.Add("ContactName", System.ComponentModel.ListSortDirection.Ascending); Regards Arun


AM Andreas Moeller April 13, 2005 01:29 AM

Hi Mr. Arun, I tried the sample from VB.Net Essential Grid and I don''t want to give a Contactname like the sample. In this sample I get some B-Values (B3,B7,B13,B2) and after the sorting I get the new order B2,B3,B7,B13. Now I want to give not the Contactname "B", I want sort the values like B5,A7,V3,D9 to A7,B5,D9,V3 (from A to Z) or numbers like 34,23,78,44 to 23,34,44,78. Is it possible? How I have to descripe the contactname? P.S. I want to combine this module with the ExcelRW-module to show the values and for save in a xls-format. I think that should be possible. Regards Andreas >Hi Andreas, > >Are you referring to the AlphabeticalPaging sample in the ASP.NET version of Essential Grid? > >In that sample you can sort by: > >this.GridGroupingControl1.TableDescriptor.SortedColumns.Add("ContactName"); > >or > >this.GridGroupingControl1.TableDescriptor.SortedColumns.Add("ContactName", System.ComponentModel.ListSortDirection.Ascending); > >Regards >Arun >


AD Administrator Syncfusion Team April 14, 2005 02:11 PM

Hi Andreas, the sorting in the WebGrid works the same as found in the GridGroupingControl for Windows Forms. You can specify a custom comparer for the column you sort by. Is that something you want to do? See the following KB for a custom Comparer http://www.syncfusion.com/Support/article.aspx?id=10507 The same logic can be applied to a web grid. But let me know if I misunserstood your requirements. Thanks, Stefan >Hi Mr. Arun, > >I tried the sample from VB.Net Essential Grid and I don''t want to give a Contactname like the sample. In this sample I get some B-Values (B3,B7,B13,B2) and after the sorting I get the new order B2,B3,B7,B13. Now I want to give not the Contactname "B", I want sort the values like B5,A7,V3,D9 to A7,B5,D9,V3 (from A to Z) or numbers like 34,23,78,44 to 23,34,44,78. Is it possible? How I have to descripe the contactname? > >P.S. I want to combine this module with the ExcelRW-module to show the values and for save in a xls-format. I think that should be possible. > >Regards >Andreas > >>Hi Andreas, >> >>Are you referring to the AlphabeticalPaging sample in the ASP.NET version of Essential Grid? >> >>In that sample you can sort by: >> >>this.GridGroupingControl1.TableDescriptor.SortedColumns.Add("ContactName"); >> >>or >> >>this.GridGroupingControl1.TableDescriptor.SortedColumns.Add("ContactName", System.ComponentModel.ListSortDirection.Ascending); >> >>Regards >>Arun >>

Loader.
Live Chat Icon For mobile
Up arrow icon