Solved

Datagridview sortmode

Posted on 2008-10-13
5
1,393 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

733 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