Bind Popup Control to Data
Although you can create windows and specify their properties manually, you can also bind to a data source to populate windows. You can bind ASPxPopupControl to any object that implements the IListSource, IEnumerable, or IDataSource interface (for example, SqlDataSource, XmlDataSource).
Use any of the following ASPxPopupControl properties to specify the data source:
- ASPxDataWebControlBase.DataSource to programmatically supply a data object.
- ASPxDataWebControl.DataSourceID to define a declarative data source.
The image below demonstrates the path to bind an ASPxPopupControl to an XML file.
ASPxPopupControl automatically creates a PopupWindow object for each record in the data source and retrieves their property values from corresponding items.
Additionally, you can handle the ASPxPopupControl’s DataBound, DataBinding and WindowDataBound events.