Grid View for ASP.NET Web Forms - How to dynamically switch the Grid's data source and recreate columns at runtime
This example demonstrates how to use the same grid to display different data sources (SqlDataSource instances).
Grid columns are recreated when a new data source is assigned. Note that the data source is unconditionally assigned on each postback/callback in the ASPxGridView.Load event handler, while columns are recreated only after the data source is switched.
- Default.aspx (VB: Default.aspx)
- Default.aspx.cs (VB: Default.aspx.vb)
- How to bind ASPxGridView created at design mode to different data sources at runtime
The grid is created in design mode. - How to bind ASPxGridView with manually created columns to different data sources
The grid is created in design mode. - How to bind ASPxGridView created at runtime to different data sources
The grid is created at runtime.
(you will be redirected to DevExpress.com to submit your response)