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:


    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
    Yana avatar
    5013 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,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top