By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,018 Members | 878 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,018 IT Pros & Developers. It's quick & easy.

Formatting GridView Columns Dynamically

P: n/a
I'd like to use a programmatically bound GridView to display a dataset (or
work with a datareader) that may include everchanging numbers of database
columns, in unpredictable order, with varying datatypes. I will be letting
end-users pick which columns to display and wonder how I could format
columns (e.g. centered vs. left-aligned, short-date vs. longdate format,
numbers vs. currency, etc.) depending on the datatype.

So, I know how to do this with fixed columns with GridView but I haven't a
clue on how to format columns and their contents dynamically. It seems I
could do this a lot easier with code that generates HTML dynamically as one
long string.

Any suggestions or tips on how I can do this? Thanks.

Mar 30 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.