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.
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.