Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Grid > ClientEvents-OnCommand does not fire ItemCommand

Not answered ClientEvents-OnCommand does not fire ItemCommand

Feed from this thread
  • bahgat avatar

    Posted on Sep 8, 2010 (permalink)

    i have problem ClientEvents-OnCommand does not fire ItemCommand 

    i use v 2010.2.908.35


    this is my code

     function OnCommand(sender, args)
     {

                if (args.get_commandName() == "RebindGrid")
                {
                    var tree = $find("<%=RadPanelBar2.ClientID%>").findItemByValue("the_value2").findControl("RadTreeView1");

                    alert(tree.get_checkedNodes().length);
                    if (tree.get_checkedNodes().length <= 0) {
                        args.set_cancel(true);
                    }

            }
     }


    when the commandName = "RebindGrid"  do postback  but  it does not fire itemcomamnd
             
    but when the commandName =  any thing else it  do postback  and  fire itemcomamnd


    and how can i get the ticket #212372.

    thanks

    Reply

  • Rosen Rosen admin's avatar

    Posted on Sep 9, 2010 (permalink)

    Hi Bahgat,

    This is expected behavior and it is by design. As the client-side RebindGrid command actually rebinds the RadGrid and it may be fired outside of the item's context, for example by calling rebind method or through firecommand (which is actually used behind the scene with OnCommand client-side handler), command cannot use server-side event bubbling to raise ItemCommand event as an item may not even exist.

    Best wishes,
    Rosen
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Grid > ClientEvents-OnCommand does not fire ItemCommand
Related resources for "ClientEvents-OnCommand does not fire ItemCommand"

ASP.NET Grid Features  |  Documentation  |  Demos  |  Step-by-step Tutorial  ]