WebCustomUserControlViewItem Class

A View Item that displays a specific data-bound control in a UI.

Namespace: DevExpress.ExpressApp.Web.Editors

Assembly: DevExpress.ExpressApp.Web.v18.2.dll

Declaration

public class WebCustomUserControlViewItem :
    ViewItem,
    IDisposable,
    IComplexViewItem
Public Class WebCustomUserControlViewItem
    Inherits ViewItem
    Implements IDisposable,
               IComplexViewItem

In certain scenarios, you may need to add a data-bound ASP.NET User Control to a Detail or Dashboard View. To do this, add a IModelCustomUserControlViewItemWeb child node to the required Views | <DetailView> | Items node.

DataBoundControlWeb3

Set the child node's IModelCustomUserControlViewItemWeb.CustomControlPath property to the file name of the custom Web User Control (e.g., WebUserControl1.ascx).

For a complete example of using the WebCustomUserControlViewItem, refer to How to: Show a Custom Data-Bound Control in an XAF View (ASP.NET) topic.

As the WebCustomUserControlViewItem supports IComplexViewItem interface, it has access to the XafApplication object and IObjectSpace of the current View.

Tip

To access the Web User Control, implement a custom Controller that is activated for the View containing the WebCustomUserControlViewItem and use the ViewItem.Control property.

Inheritance

Object
ViewItem
WebCustomUserControlViewItem

Implements

See Also