Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]ASP.NET WebForms Controls
 [Collapse]ASP.NET MVC Extensions
  [Expand]Product Information
  [Expand]Getting Started
  [Expand]Common Concepts
  [Expand]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]HTML Editor
  [Expand]Image and Data Browsing
  [Collapse]Docking and Popups
   [Expand]Docking
   [Expand]Hint
   [Expand]Loading Panel
   [Collapse]PopupControl
     Overview - PopupControl
    [Collapse]Concepts
      Binding to Data
      Templates
    [Expand]Visual Elements
  [Expand]Navigation and Layout Extensions
  [Expand]File Management
  [Expand]Multi-Use Site Extensions
  [Expand]Charts
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Tree List
  [Expand]Data Editor Extensions
  [Expand]Report Extensions
  [Expand]SpellChecker
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Binding to Data

A PopupControl can be populated with information taken from a data source, which can be any object that implements the IListSource, IEnumerable or IDataSource interface (e.g. SqlDataSource, XmlDataSource).

The MVC Popup Extension provides the following data binding methods:

Expanded Automatic Data Binding

The MVC Popup Extension has a built-in ability to automatically retrieve data from a data source. PopupControl creates an MVCxPopupWindow object for each record in a data source and retrieves window characteristics from those data fields whose names coincide with certain property names of the MVCxPopupWindow object. The table below lists names of window object properties that can be mapped during automatic binding and also lists matching data field names you should use in a data source in order for the mapping to work.

Window properties that can be set automatically

Data field names

PopupWindow.ContentUrl (via MVCxPopupControl.ContentUrl) ContentUrl
PopupWindow.Enabled (via MVCxPopupControl.Enabled) Enabled
PopupWindow.Name (via MVCxPopupControl.Name) Name
PopupWindow.PopupElementID (via MVCxPopupControl.PopupElementID) PopupElementID
PopupWindow.ShowHeader (via MVCxPopupControl.ShowHeader) ShowHeader
PopupWindow.ShowFooter (via MVCxPopupControl.ShowFooter) ShowFooter
PopupWindow.Target (via MVCxPopupControl.Target) Target
PopupWindow.Text (via MVCxPopupControl.Text) Text
PopupWindow.ToolTip (via MVCxPopupControl.ToolTip) ToolTip

Additionally to window properties mapping, PopupControl possesses the ability to retrieve some window header and window footer characteristics from data fields named in a specific way.

Window header properties that can be set automatically

Data field names

PopupWindow.HeaderNavigateUrl (via MVCxPopupControl.HeaderNavigateUrl) HeaderNavigateUrl
PopupWindow.HeaderText (via MVCxPopupControl.HeaderText) HeaderText
ImagePropertiesBase.Url (via MVCxPopupControl.HeaderImage.Url) HeaderImageUrl
ImagePropertiesBase.Height (via MVCxPopupControl.HeaderImage.Height) HeaderImageHeight
ImagePropertiesBase.Width (via MVCxPopupControl.HeaderImage.Width) HeaderImageWidth

Window footer properties that can be set automatically

Data field names

PopupWindow.FooterNavigateUrl (via MVCxPopupControl.FooterNavigateUrl) FooterNavigateUrl
PopupWindow.FooterText (via MVCxPopupControl.FooterText) FooterText
ImagePropertiesBase.Url (via MVCxPopupControl.FooterImage.Url) FooterImageUrl
ImagePropertiesBase.Height (via MVCxPopupControl.FooterImage.Height) FooterImageHeight
ImagePropertiesBase.Width (via MVCxPopupControl.FooterImage.Width) FooterImageWidth
ImagePropertiesBase.Url (via MVCxPopupControl.SizeGripImage.Url) SizeGripImageUrl
ImagePropertiesBase.Height (via MVCxPopupControl.SizeGripImage.Height) SizeGripImageHeight
ImagePropertiesBase.Width (via MVCxPopupControl.SizeGripImage.Width) SizeGripImageWidth

Since the properties of a System.Web.SiteMapNode object have specific names, PopupControl is designed to automatically bind to a Site Map source with window attributes with similar names. In the process of binding, corresponding properties of individual MVCxPopupWindow objects are automatically associated with these item attributes and mapped accordingly. See the table below for name correspondence.

Site Map node attributes

Corresponding PopupWindow object properties

System.Web.SiteMapNode.Title PopupWindow.Text (via MVCxPopupControl.Text)
System.Web.SiteMapNode.Description PopupWindow.ToolTip (via MVCxPopupControl.ToolTip)
System.Web.SiteMapNode.Url PopupWindow.HeaderNavigateUrl (via MVCxPopupControl.HeaderNavigateUrl),
PopupWindow.FooterNavigateUrl (via MVCxPopupControl.FooterNavigateUrl)

The structure of a Site Map allows flexibility in the naming of item attributes. After PopupControl detects the above-listed item attributes in the bound Site Map source, other properties are determined using conditions described in the above section.

Note

PopupControl ignores Text and ToolTip attributes if they are specified within a Site Map data source. The HeaderNavigateUrl and FooterNavigateUrl attributes redefine values of corresponding PopupWindow properties.

Expanded Online demos

How would you rate this topic?​​​​​​​