Assigning client-side event handler in code behind

2 posts, 0 answers
  1. Val
    Val avatar
    18 posts
    Member since:
    Aug 2007

    Posted 07 Aug 2008 Link to this post

    I need to dynamically specify the client side event handler in code behind but I don't seem to figure it out. Tried to no avail the following:

    MyRadToolBarRefresh.Attributes.Add("OnClientButtonClicking","ToolbarCheckDirty");

    or MyRadToolBarRefresh.OnClientButtonClicking = "ToolbarCheckDirty";

    or Page.ClientScript.RegisterStartupScript(Page.GetType(), "RadToolBarRefresh_ButtonClicking", "$find('" +.MyRadToolBarRefresh.ClientID +      "').add_buttonClicking(ToolbarCheckDirty)", true)

    or RadAjaxManagerMaster.ResponseScripts.Add("$find('" + MyRadToolBarRefresh.ClientID + "').add_buttonClicking(ToolbarCheckDirty)");

  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 08 Aug 2008 Link to this post

    Hi Val,

    This code snippet should work:

    MyRadToolBarRefresh.OnClientButtonClicking = "ToolbarCheckDirty" 

    Please check the attached project for a reference.

    Kind regards,
    Yana
    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
Back to Top