471,354 Members | 1,301 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

Datagrid sorting by date?

Is there a way to properly sort by date (not string) in a datagrid?
The date is shoved into a DataGridTextBoxColumn type, which seems to be
the only alternative. Then is sorts by string instead of date.

Thanks,
Brett

Feb 15 '06 #1
2 5605
Hello Brett,

You need realize wrapper class that implements IComparable.
Here is a sample: http://groups.google.com/group/micro...8c0aff2a96be6e
BR> Is there a way to properly sort by date (not string) in a datagrid?
BR> The date is shoved into a DataGridTextBoxColumn type, which seems to
BR> be
BR> the only alternative. Then is sorts by string instead of date.
BR> Thanks,
BR> Brett
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Feb 15 '06 #2
Thanks. Does .NET 2.0 DataGridView have a date column type built in?

Brett

Feb 15 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Gacu | last post: by
2 posts views Thread by Ken Tucker | last post: by
2 posts views Thread by Mike P | last post: by
reply views Thread by Patrick Delifer | last post: by
4 posts views Thread by yer darn tootin | last post: by
2 posts views Thread by saleek | last post: by
3 posts views Thread by TPhelps | last post: by
4 posts views Thread by G .Net | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.