Reputation: 91
I have some 20 pages to be developed, mostly containing data shown in tabular format. Columns and data are all different for all pages.
I was wondering that I could create a user control which can create the columns dynamically, but I am stuck with which data control of asp.net would be best in terms of performance and easy to implement. That way I can just have a single user control used in all pages.
Please help me out with your valuable suggestions. If there is some other better way to handle this situation, I would be glad to hear it.
Upvotes: 0
Views: 802
Reputation: 56716
Youd do not need to implement a custom user control: GriView does this out of the box - check out the AutoGenerateColumns property.
Upvotes: 1
Reputation: 6425
For display of tabular data with auto column naming a GridView is probably the way to go. It's incredibly easy to implement, just bind your data to the view and you are done.
If performance is the primary concern, I think (but am not certain) that a repeater is faster. I doubt it makes /that much/ difference tbh.
Upvotes: 2