The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientRatingControl.ItemClick Event

Fires on the server after an item has been clicked.

Declaration

ItemClick: ASPxClientEvent<ASPxClientRatingControlItemClickEventHandler<ASPxClientRatingControl>>

Event Data

The ItemClick event handler receives an argument of the ASPxClientRatingControlItemClickEventArgs type. The following properties provide information specific to this event.

Property Description
index Gets the index of the item related to the event.
processOnServer Gets or sets a value that specifies whether the event should be finally processed on the server side.

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.

Examples

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