RadGrid client command not giving access to get_itemIndexHierarchical() (JS error "is not a function")

2 posts, 0 answers
  1. Tom
    Tom avatar
    2 posts
    Member since:
    Apr 2016

    Posted 23 Jun Link to this post

    Here is my code:


    function RadGrid1_Command(sender, args) {
                   var commandName = args.get_commandName();
                   if (commandName == "RebindGrid")
                       var editedrow = args.get_itemIndexHierarchical();

                       //var itemIndex = args.get_commandArgument();

                       var master = $find('<%= RadGrid1.ClientID %>').get_masterTableView();
                           type: "POST",
                           url: "Default.aspx/...",
                           data: "{year: 1}",
                           contentType: "application/json; charset=utf-8",
                           dataType: "json",
                           success: function (data) {
                               var response = data.d;

    I can't get the row index from get_itemIndexHierarchical() (JS error function does not exist). Also get_commandArgument() is blank if  I try that.


    Can anyone help?

  2. Viktor Tachev
    Viktor Tachev avatar
    1438 posts

    Posted 27 Jun Link to this post

    Hi Tom,

    Note that you can access the CommandName and CommandArgument via the arguments of the OnCommand handler. When the command is "Rebind" there is no need for additional arguments, thus the get_commandArgument() merhod returns an empty string.

    With that said, would you elaborate in more detail on what is the behavior that you would like to implement?

    Viktor Tachev
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. DevCraft R3 2016 release webinar banner
Back to Top