Solved

Datagridview sortmode

Posted on 2008-10-13
5
1,385 Views
Last Modified: 2013-11-25
I need to be able to sort a column of a datagridview by the fields 'date' value not 'alpha-numeric' value.

In the properties for that field you have the option to set the 'sortmode' from 'automatic' to 'Programmatic' or 'none'.     Can I substitute my own sort routine here ?
0
Comment
Question by:sidwelle
  • 2
  • 2
5 Comments
 
LVL 1

Expert Comment

by:crumber
ID: 22703836
bind the datafield to the date data type from the database and then format it using the gridview.  
This way the data coming across will be in date format, and any auto formatting in the gridview will be using the date value, not alpha.
0
 

Author Comment

by:sidwelle
ID: 22704500
How do I do that ?, the columns are added through the Add/Column editor.  
I don't see an option to bind anywhere.  
Shouldn't it pickup the type through the adapter ?
0
 
LVL 1

Expert Comment

by:crumber
ID: 22707252
I was assuming that you were using VB Studio web development.  I guess that you are using VB for windows.
Am I correct?
0
 

Accepted Solution

by:
sidwelle earned 0 total points
ID: 22707751
vb.net from VS 2005
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now