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

ASPxClientRatingControl.ItemClick Event

Fires on the server after an item has been clicked.

Declaration

ItemClick: ASPxClientEvent<ASPxClientRatingControlItemClickEventHandler<ASPxClientRatingControl>>

Event Data

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

Property Description
index Gets the index of the item related to the event.
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 rating 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.

Example

This part of the Voting demo illustrates how to use the ASPxRatingControl.

Here, the ASPxRatingControl‘s read only status is enabled and disabled by using the ASPxClientRatingControl.SetReadOnly method within the ASPxRatingControl‘s ASPxClientRatingControl.ItemClick and ASPxCallback‘s ASPxClientCallback.CallbackComplete client events.

The ASPxRatingControl.ClientInstanceName property value is used to access the ASPxRatingControl on the client side.

...
protected void cbVoting_Callback(object source, CallbackEventArgs e) {
    ...
    CurrentUserRatingValue = (int)ratingControl.Value;
    ...
}
See Also