RadGrid with OnItemCommand and ClientSettings-ClientEvents-OnCommand

2 posts, 0 answers
  1. Paul Somberg
    Paul Somberg avatar
    9 posts
    Member since:
    Feb 2009

    Posted 19 Apr 2013 Link to this post


    I have a RadGrid for which I use the OnItemCommand event. As expected, in the event handler I can find the GridDataItem from which the event was sent in the GridCommandEventArgs.Item.

    Now I add a client side event handler for the event ClientSettings-ClientEvents-OnCommand. After this (javascript) event handler is called, a postback occurs and the server side OnItemCommand event is fired. But the GridCommandEventArgs.Item is now always referring to the first item in the grid and not the item that caused the event to be fired!

    Am I doing something wrong?

  2. Andrey
    Andrey avatar
    836 posts

    Posted 24 Apr 2013 Link to this post


    Yes, as this help topic says this could happen if you are firing a custom command on the client-side. All custom commands are fired through the first item in RadGrid. This behavior is by design.

    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. DevCraft R3 2016 release webinar banner
Back to Top