J
joshblair
Hello,
I have an OleDbDataReader that contains data from a crosstab query.
The column count, and their names of many of the columns are not known
at design time. The cross tab in question is returning currency data
in these columns but in the datareader using OleDB, the columns are of
type decimal. I'd like to able to add formatting to these columns on
the fly at runtime but have been unable to figure this out.
Is there a way to manipulate the data and the formatting of that data
dynamically even if I don't know the names of the columns in question
at designtime?
One idea I had was to obtain the data in a DataTable rather than a
DataReader and then manipulate the data before binding it to the
datagrid.
What about overriding the ItemDataBound event or something similar?
Any ideas or recommendations are very much appreciated.
Thanks,
Josh Blair
I have an OleDbDataReader that contains data from a crosstab query.
The column count, and their names of many of the columns are not known
at design time. The cross tab in question is returning currency data
in these columns but in the datareader using OleDB, the columns are of
type decimal. I'd like to able to add formatting to these columns on
the fly at runtime but have been unable to figure this out.
Is there a way to manipulate the data and the formatting of that data
dynamically even if I don't know the names of the columns in question
at designtime?
One idea I had was to obtain the data in a DataTable rather than a
DataReader and then manipulate the data before binding it to the
datagrid.
What about overriding the ItemDataBound event or something similar?
Any ideas or recommendations are very much appreciated.
Thanks,
Josh Blair