Grid View for ASP.NET Web Forms - How to bind the control created in design mode to different data sources at runtime
This example demonstrates how to bind ASPxGridView with autogenerated columns to different data sources at runtime. The grid is created in design mode.
The project contains an ASPxRadioButtonList control that allows users to switch between three data sources (SqlDataSource).
Note that the grid's EnableViewState property is set to false
to avoid exceptions when binding the grid to another data source.
- Default.aspx (VB: Default.aspx)
- Default.aspx.cs (VB: Default.aspx.vb)