Datagrid sorting by date?

  • Thread starter Thread starter Brett Romero
  • Start date Start date
B

Brett Romero

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
 
Hello Brett,

You need realize wrapper class that implements IComparable.
Here is a sample: http://groups.google.com/group/micr...t+custom+sorting+grid&rnum=4#198c0aff2a96be6e


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 Nietzsch
 
Thanks. Does .NET 2.0 DataGridView have a date column type built in?

Brett
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top