
I'm trying to use the set_cancel() function in the client side OnRowClick event and it said the function does no exist.
The help file says "Can Be Cancelled: Yes, meaningful when setting ClientSettings -> EnablePostBackOnRowClick to true" and even has sample code demonstrating it. I do have enablepostbackonrowclick set to true but the method cannot be found.
eventArgs is returning an object and I can successfully get the data grid item from it.
Any ideas?
Thanks,
Vandara Peou
4 Answers, 1 is accepted
I can't find the mentioned statement in our documentation. The actual link is shown below:
OnRowClick
This event is fired when a row is clicked.
Fired by |
RadGridTable |
Arguments |
gridDataItem - tablerow instance domEvent - dom event |
Can be canceled |
No |
Examples |
ascx/aspx <ClientEvents OnRowClick="RowClick" ... JavaScript <script> function RowClick(sender, eventArgs) { alert("Click on row instance: " + eventArgs.get_itemIndexHierarchical()); </script> |
Please let me know if I missed something.
Kind regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.

The exact entry is located below:
Telerik.Web.UI.GridDataItemEventArgs OnRowClick Property
note
To get or set property values for client API properties, you must call property accessor methods that are named with the get_ and set_ prefixes. For example, to get or set a value for a property such as cancel, you call the get_cancel or set_cancel |
This event is fired when a row is clicked.
Fired by |
RadGridTable |
Arguments |
gridDataItem - tablerow instance domEvent - dom event |
Can be canceled |
Yes, meaningful when setting ClientSettings -> EnablePostBackOnRowClick to true |
Examples |
ascx/aspx <ClientEvents OnRowClick="RowClick" ... JavaScript <script> function RowClick(sender, eventArgs) { alert("Click on row instance: " + eventArgs.get_itemIndexHierarchical()); } </script> |
note
get_gridDataItem() is not directly available on the client unless OnRowCreating/OnRowCreated events are hooked up. This is done for optimization purpose. If you need the rowIndex, you can use eventArgs.get_itemIndexHierarchical() |
I noticed the mentioned problem. We need some time to investigate the reason for this discrepancy. You will be notified when we have some information about this matter.
Thank you for your cooperation.
Best regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
RowClick client-side event cannot be canceled in the current version of RadControls for ASP.NET AJAX. We already fixed the depicted discrepancy in our documentation.
Please excuse us for the caused inconvenience. As a sign of gratitude for your cooperation I added Telerik points to your account.
Best regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.