Skip to main content

ASPxDataViewBase.ClientInstanceName Property

Gets or sets the control’s client programmatic identifier.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.2.dll

NuGet Package: DevExpress.Web


public string ClientInstanceName { get; set; }

Property Value

Type Default Description
String String.Empty

A string value that specifies the control’s client identifier.


Use the ClientInstanceName property to specify a unique client-side identifier for a control derived from the ASPxDataViewBase. The ClientInstanceName property’s value can be used on the client side to programmatically access the client object rendered for the control in client-side script. This property is particularly important in referencing the data view control when it is contained within a naming container (for example, within an ASPxPageControl‘s page or an ASPxPopupControl‘s window).

If the ClientInstanceName property is not specified for a control, the control’s client identifier is generated automatically, and equals the value of the control’s ID property. Note that in this case, client-side programmatic access to the control is not allowed when the control is contained within a naming container.


This example demonstrates how data displayed by the ASPxDataView control can be filtered on custom callbacks initiated by a call to the client PerfromCallback method.

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="DevExpress.Web.v8.3, Version=, Culture=neutral, 
    Namespace="DevExpress.Web.ASPxDataView" TagPrefix="dxdv" %>  
<%@ Register Assembly="DevExpress.Web.v8.3" Namespace="DevExpress.Web.ASPxEditors"
    TagPrefix="dxe" %> 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 

<script runat="server">
     protected void Page_Load(object sender, EventArgs e) {
         if(!IsPostBack) { // start value
             cbCountry.Value = 254; // USA for example

     protected void PrepareFilter() {
         dvAccessDataSource.SelectParameters[0].DefaultValue = cbCountry.Value.ToString();

<html xmlns="" >
 <head runat="server">
     <title>Filtering data within the ASPxDataView using custom callbacks</title>
     <form id="form1" runat="server">
         <table cellpadding="0" cellspacing="0">
                <td align="right" style="white-space: nowrap;">
                    <table cellpadding="0" cellspacing="0"><tr>
                        <td valign="middle">
                            <dxe:ASPxLabel ID="lblFilter" runat="server" 
                              Text="Filter: " AssociatedControlID="cbCountry">
                        <td valign="middle">
                            <dxe:ASPxComboBox ID="cbCountry" runat="server" 
                                TextField="Country" ValueField="CountryId" 
                                 ValueType="System.Int32" EnableIncrementalFiltering="True">
                            <ClientSideEvents SelectedIndexChanged="function(s, e) {
}" />
            <tr><td style="height: 5px;"></td></tr> DataView 
                    <dxdv:ASPxDataView ID="dvCity" runat="server" 
                      ClientInstanceName="dvCity" Width="580px" AllowPaging="False">
                        <ItemStyle Height="60px" Width="150px" />
                            <table cellpadding="0" cellspacing="0">
                                    <td rowspan="3"><div style="width: 5px;"></div></td>
                                    <td><asp:Label ID="CountryIdLabel" runat="server" 
                                           Text='<%# Eval("CountryId") %>'>
                                    <td><asp:Label ID="CityIdLabel" runat="server" 
                                           Text='<%# Eval("CityId") %>'></asp:Label></td>
                                    <td><asp:Label ID="CityLabel" runat="server" 
                                            Text='<%# Eval("City") %>'>
                        <Border BorderColor="#A0A0A0" BorderStyle="Solid" BorderWidth="1px" />
                        <Paddings Padding="5px" />
            </tr>         </table>

        <asp:AccessDataSource ID="cbAccessDataSource" runat="server" 
            SelectCommand="SELECT * FROM [Countries]">
        <asp:AccessDataSource ID="dvAccessDataSource" runat="server" 
            SelectCommand="SELECT * FROM [Cities] WHERE ([CountryId] = ?)">
                <asp:Parameter DefaultValue="1" Name="CountryId" Type="Int32" />
        </asp:AccessDataSource>     </form>
See Also