HtmlContentPopup.DataContext Property
Gets or sets the window’s data context (a business object or data source item).
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.XtraEditors.v24.2.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
Object | null | The data context. |
Remarks
The DataContext property allows you to bind the window to a data context (a business object or data source item).
Use the following syntax to display a value of a specific field from the bound data context: ${FieldName}
.
For example, the following code displays a value of the “UserName” field from the data context.
<div class='contactName'>${UserName}</div>
The ‘$’ character at the beginning of the “${UserName}” expression specifies that the text that follows is an interpolated string—an expression that the control needs to evaluate. An interpolated string can contain static text, data binding to multiple fields, and field value formatting (see string interpolation for more information). The following example adds the ‘Welcome’ string before a user name:
<h1>$Welcome {UserName}!</h1>