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