Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamically define GridView columns
Message
From
07/07/2006 16:24:55
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Dynamically define GridView columns
Environment versions
Environment:
ASP.NET
Miscellaneous
Thread ID:
01134578
Message ID:
01134578
Views:
63
Using ASP.Net 2.0, can I dynamically define a GridView's columns on a WebForm at runtime?

For example, I have an order status WebForm that shows order history, back orders, credits etc... If a user selects the back order view button, I would like to show different columns of data in the GridView than if he selected the credit view button. My GridView control exists on the WebForm, I would just like to display different columns at runtime.

It would be similar to a VFP WinForm and defining a grids columns at runtime as such:
       ***VFP Code
       mygrid.COLUMN1.CONTROLSOURCE  = "orderno"
       mygrid.COLUMN2.CONTROLSOURCE  = "partno"
       mygrid.COLUMN3.CONTROLSOURCE  = "desc"
Can the same thing be done in a ASP.Net WebForm. Or what other ways can I accomplish show different columns in a GridView at runtime.

Thanks,

Jerry
Next
Reply
Map
View

Click here to load this message in the networking platform