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

ASPxClientCloudControl.ItemClick Event

Fires after an item has been clicked.

Declaration

ItemClick: ASPxClientEvent<ASPxClientCloudControlItemEventHandler<ASPxClientCloudControl>>

Event Data

The ItemClick event's data class is ASPxClientCloudControlItemEventArgs. The following properties provide information specific to this event:

Property Description
htmlElement Gets the HTML object that contains the processed item.
htmlEvent Gets a DHTML event object that relates to the processed event.
name Gets the name that uniquely identifies the processed item.
processOnServer Specifies whether or not to process the event on the server. Inherited from ASPxClientProcessingModeEventArgs.

Remarks

Write a ItemClick event handler to perform specific actions on the client side each time an item is clicked within the ASPxCloudControl control. Note that this event fires immediately after the left mouse button is released. If the button is released when the mouse pointer is not over an item, the event doesn’t fire. You can use the event parameter’s properties to obtain the clicked item’s name and specify whether a postback should be generated to pass the event processing to the server side.

Example

The following example illustrates how to obtain the Text property value of a clicked Iiem on the client side.

<dx:ASPxCloudControl ID="ASPxCloudControl1" runat="server" DataSourceID="AccessDataSource1"
    TextField="Name" ValueField="Area">
    <ClientSideEvents ItemClick="function(s, e) {
    var text = e.htmlElement.innerText;
    alert(text);
    }" />
</dx:ASPxCloudControl>
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Data.mdb"
    SelectCommand="SELECT [Name], [Area] FROM [country]"></asp:AccessDataSource>
See Also