using asp:button in radwindow

4 posts, 0 answers
  1. Teoman
    Teoman avatar
    69 posts
    Member since:
    Jan 2009

    Posted 27 Jan 2010 Link to this post

    i have a asp button called delete.i want that when i push delete button radwindow asks "are you sure want to delete" than i want to called the sp with its return.i put a two asp button in radwindow called ok and cancel but when i called it , it does not show me the buttons.can you help me about how can i make this senario?
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 28 Jan 2010 Link to this post

    Hello Teoman,

    It is working well as expected when I tried a small example. Here is the code that I tried. Try copy the code and see whether its working fine for you also.

    aspx:
     
    <telerik:RadWindow runat="server" Behavior="Default" InitialBehavior="None" Left="" 
        OpenerElementID="Button1" Top=""
        <ContentTemplate> 
            <asp:Button ID="Button2" runat="server" OnClick="Button2_Click1" Text="OK" /> 
            <asp:Button ID="Button3" runat="server" OnClick="Button3_Click1" Text="Cancel" /> 
        </ContentTemplate> 
    </telerik:RadWindow> 
     
    <asp:Button ID="Button1" runat="server" Text="Delete" /> 

    cs:
     
        protected void Button2_Click1(object sender, EventArgs e) 
        { 
            Response.Write("Clicked OK"); 
        } 
        protected void Button3_Click1(object sender, EventArgs e) 
        { 
            Response.Write("Clcked Cancel"); 
        } 

    Alternatively you can use radconfirm for this purpose with conditional postback so that the result will be accessed on server side. Checkout the following forum link which described on this.
    radconfirm

    -Shinu.
  3. Teoman
    Teoman avatar
    69 posts
    Member since:
    Jan 2009

    Posted 28 Jan 2010 Link to this post

    hi, i tried your code but still its not working.radwindow opening but it doesnt have any buttons.
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            </telerik:RadScriptManager>
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            </telerik:RadAjaxManager>
            <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
            </telerik:RadWindowManager>
            <telerik:RadWindow ID="RadWindow1" runat="server" Behavior="Default" InitialBehavior="None" Left=""
        OpenerElementID="Button1" Top="">
        <ContentTemplate>
            <asp:Button ID="Button2" runat="server" OnClick="Button2_Click1" Text="OK" />
            <asp:Button ID="Button3" runat="server" OnClick="Button3_Click1" Text="Cancel" />
        </ContentTemplate>
    </telerik:RadWindow>
    <asp:Button ID="Button1" runat="server" Text="Delete" />

  4. Teoman
    Teoman avatar
    69 posts
    Member since:
    Jan 2009

    Posted 02 Feb 2010 Link to this post

    i have still problem.Somebody help me please?
Back to Top