Skip to main content
A newer version of this page is available. .

Client-Side Functionality

  • 2 minutes to read

The DevExpress ASP.NET controls include an advanced client-side API that is implemented with JavaScript and allows you to combine server-side and client-side functionality.

A server object’s client-side equivalent includes the ASPxClient prefix in its name (for instance, ASPxClientGridView for ASPxGridView).

Access a Control on the Client Side

The ClientInstanceName property specifies a name that you can use to access the control’s client object in code.

Run Demo: Dock and Popups - Client-Side Functionality

<dx:ASPxDockManager runat="server" ID="dockManager" ClientInstanceName="manager" />
var panel = manager.GetPanelByUID('MyPanel');
panel.Dock(manager.GetZoneByUID('MyZone'),0);

See also

KB Article: How to use the ClientInstanceName and Name properties when they contain special characters.

Enable a Control’s Client API

Set a control’s EnableClientSideAPI property to true to make the control’s client-side API available for developers. If a control does not have the EnableClientSideAPI property, the client API is always available for this control on the client side.

A control’s client-side API is automatically available if you handle any of its client-side events or specify its ClientInstanceName property.

The Client API Can be Disabled in the Following Cases

  • If a web control’s server-side Visible property is set to false, it is impossible to interact with the control on the client side because the control is not rendered on the web page. Use the ClientVisible property to define the control’s initial visibility state. Then use the client SetVisible method to change the control’s visibility dynamically.
  • If a web control is disabled on the server (that is, the server-side Enabled property is set to false), it is impossible to manage its availability state on the client side. Use the ClientEnabled property to define the control’s initial availability state. Then, use the client SetEnabled method to change the control’s availability dynamically.
  • A client-side API member does not work if its corresponding element is not initialized on the server side.

    For instance, if an item image is not specified on the server side, the image element is not rendered on the client side. In this particular instance, the item’s SetItemImage method is not in effect.

  • Some control styles (for instance, a disabled style) are sent to the client side with the API service’s JavaScript code. If a client-side API is disabled, styles are not applied.