set_cancel in OnRowClick event

5 posts, 0 answers
  1. Vandara Peou
    Vandara Peou avatar
    20 posts
    Member since:
    Apr 2006

    Posted 16 Dec 2008 Link to this post

    Hi,

    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
  2. Daniel
    Admin
    Daniel avatar
    4943 posts

    Posted 16 Dec 2008 Link to this post

    Hello Vandara,

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Vandara Peou
    Vandara Peou avatar
    20 posts
    Member since:
    Apr 2006

    Posted 16 Dec 2008 Link to this post

    I'm looking at the help file for ASP.NET AJAX Q3 2008. It has a revision date of 11/05/2008. I see that the link you sent me has a revision of 12/03/2008 so I'm guessing the functionality was just taken out in one of the revisions and not documented in the list of changes?

    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());
        eventArgs.set_cancel(true);

     }

    </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()

  5. Daniel
    Admin
    Daniel avatar
    4943 posts

    Posted 19 Dec 2008 Link to this post

    Hello Vandara,

    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.
  6. Daniel
    Admin
    Daniel avatar
    4943 posts

    Posted 13 Jan 2009 Link to this post

    Hello Vandara,

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017