Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting Dates in Datagrid - Should I redesign???

Status
Not open for further replies.

ChasBoots

MIS
Jul 23, 2002
24
US
Here is the situation. I have a form that runs one of several reports as chosen by the user. Each report produces a different number of columns with different field names. The resulting data ultimately populates a datagrid that autogenerates the required columns and formats it as desired.

Selecting a column on which to sort works perfectly except for one problem: Dates are treated as strings. What makes this perhaps more problematic is that the date fields from each report might be named differently or appear in a different column. The datagrid will export to Excel perfectly and the date columns sort appropriately. Does anyone have a suggestion as to how I could reformat the date columns in the datagrid so that sorting will work correctly? Or do I need to give serious consideration to redesigning my code to accomodate bound columns?

If necessary, I can provide some code to reflect the work I am doing. Thanks to all for your input.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top