This demo illustrates how the ASPxPopupControl can be bound to a data source. The ASPxPopupControl supports standard data binding. In this instance, any object which implements the IListSource, IEnumerable or IDataSource interface (e.g. SqlDataSource, XmlDataSource) may be used as a data source for this control.
In this demo, the popup control is bound to a standard XmlDataSource type data source. It supplies the popup control with data from a specific Charts.xml file. The ASPxPopupControl requires data to be represented as the contents of different elements within popup windows. Use the XPath property to obtain the desired data sample.
Our web controls provide you with the ability to bind the properties of controls that compose a template directly to the properties of the corresponding data object (DataItem) from the bound data source. To implement, the Container.Item.DataItem property or the Container.EvalDataItem(<expression>) method can be used.
In this demo, the contents of each popup window are defined by placing a standard Image web control onto a WindowContentTemplate type template. The ImageUrl property of the Image control is bound directly to the XmlDataSource's node by using the Container.EvalDataItem(<expression>) method. (See ASPX code)
The window's footer is defined via the WindowFooterTemplate by using the Label web control whose Text property binds to the data of the corresponding xml node using the Container.EvalDataItem(<expression>) method. (See ASPX code)