Wrox Programmer Forums
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 10th, 2008, 08:29 AM
Authorized User
Join Date: Jan 2008
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default Data sorting

I have requirement of sorting the data according to Data Type of the column.Numeric and Date columns will be ordered from smallest to largest. String columns will be sorted alphanumerically without regard to case.What functionality do i need to add to a GridView to do this?

Any help or suggestion is most welcome

Thank you

Sharepoint Consulting
Sharepoint Consulting
Old March 10th, 2008, 09:19 AM
planoie's Avatar
Friend of Wrox
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

Do you need to group together row with similar data types? If so you'll need to provide some custom sorting logic.

If you were to sort the rows by that column and allow it to be sorted alphanumerically (with numeric/date values converted for sorting), you would end up with all the numeric and date type rows at the top, however, those rows would likely be mixed.


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataGridView - Sorting Data pencilneck Visual Studio 2005 0 October 23rd, 2007 04:35 PM
Sorting data in a DataSet pbyrum ADO.NET 5 May 18th, 2006 05:11 PM
sorting retrieved data don baroo Classic ASP Basics 2 November 23rd, 2004 08:31 AM
Sorting Data seidici Excel VBA 2 May 21st, 2004 02:24 PM
Sorting in Data Grid matt.fields ASP.NET 1.0 and 1.1 Basics 0 October 21st, 2003 12:39 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.