This is a migrated thread and some comments may be shown as answers.

RadWindow on Button Click

3 Answers 256 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Raj
Top achievements
Rank 1
Raj asked on 01 Apr 2013, 10:08 PM
Hi,
I need to open RadWindow on button click.While opening the RadWindow i need to call one server function for some updates for that RadWindow, same time the RadWindow should be opened after that update.How to achieve this functionality?

What i did is like this:
<asp:Button ID="btn1" runat="server" Text="Click me"
                        OnClientClick="openRadWin();" OnClick="btn1_Click" />


Thanks
raj

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 02 Apr 2013, 05:11 AM
Hi,

You can try the following code to open RadWindow.
C#:
protected void Button2_Click(object sender, EventArgs e)
{
 string script = "function f(){$find(\"" + RadWindow1.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
  ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, true); 
 }

Thanks,
Shinu
0
Raj
Top achievements
Rank 1
answered on 03 Apr 2013, 11:20 AM
Hi Shinu,

Thanks for ur code. one more problem, I have some controls in that RadWindow which has to get updated value. Controls are showing but not with updated value. Can u pls suggest me wat to do on this?


Thanks
Rajesh
0
Shinu
Top achievements
Rank 2
answered on 04 Apr 2013, 07:56 AM
Hi,

One suggestion is that you can use RadAjaxManager on page as explained in the following documentation.
RadAjaxManager

Thanks,
Shinu
Tags
Ajax
Asked by
Raj
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Raj
Top achievements
Rank 1
Share this question
or