Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
.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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 10th, 2008, 08:29 AM
Authorized User
 
Join Date: Jan 2008
Location: , , .
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
Jitesh
Programmer


Sharepoint Consulting
__________________
Sharepoint Consulting
Reply With Quote
  #2 (permalink)  
Old March 10th, 2008, 09:19 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

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.

-Peter
peterlanoie.blog
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 07:44 PM.


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