RADDock button event

2 posts, 0 answers
  1. Nareshkumar
    Nareshkumar avatar
    5 posts
    Member since:
    Oct 2013

    Posted 09 Dec 2013 Link to this post

    i have user control in RADDock, In Raddock i have Gear Button. If i click gear button it will navigate to new page, like wise i have button in usercontrol if i click  it,  navigate to same page. how should i fire button event in usercontrol when i click gear button. I am loading RADDock Dynamically
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 09 Dec 2013 Link to this post

    Hi Nareshkumar,

    Please have a look into the following code snippet to achieve your scenario.

    <telerik:RadButton ID="RadButton1" runat="server" Text="Click" AutoPostBack="false" ButtonType="LinkButton"

    ASPX Page C#:
    protected void Page_Load(object sender, EventArgs e)
        //dynamically created radbock
        RadDock RadDock1 = new RadDock();
        //dynamically created radbutton
        RadButton radbutton = new RadButton();
        radbutton.Text = "Button1";
        radbutton.ButtonType = RadButtonType.LinkButton;
        radbutton.OnClientClicked = "OnClientClicked";
        //adding dynamically created button to raddock
        //accessing usercontrol
        Control usercontrol = new Control();
        usercontrol = LoadControl("WebUserControl.ascx");
        //adding usercontrol to raddock

    ASPX Page JavaScript:
    <script type="text/javascript">
        function OnClientClicked(sender, args) {

Back to Top