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

popup server side

3 Answers 94 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Kjell
Top achievements
Rank 1
Iron
Kjell asked on 02 Oct 2012, 08:47 AM
How to open/popup RadDatePicker from server side?

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 03 Oct 2012, 05:36 AM
Hi Kjell,

Try the following code to achieve your scenario.

C#:
protected void Button1_Click(object sender, EventArgs e)
{
  string script = "function f(){$find(\"" + RadDatePicker1.ClientID + "\").showPopup(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
  ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RadDatePicker", script, true);
}

Thanks,
Shinu.
0
Kjell
Top achievements
Rank 1
Iron
answered on 03 Oct 2012, 11:58 AM
Can I get the example written for vb?
I tried to convert it converter.telerik.com but got error message ....
0
Shinu
Top achievements
Rank 2
answered on 04 Oct 2012, 04:11 AM
Hi Kjell,

Here is the code in VB.

VB:
Protected Sub Button1_Click(sender As Object, e As EventArgs)
    Dim script As String = "function f(){$find(""" + RadDatePicker1.ClientID + """).showPopup(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);"
    ScriptManager.RegisterStartupScript(Page, Page.[GetType](), "RadDatePicker", script, True)
End Sub

Hope this helps.

Thanks,
Shinu.
Tags
Calendar
Asked by
Kjell
Top achievements
Rank 1
Iron
Answers by
Shinu
Top achievements
Rank 2
Kjell
Top achievements
Rank 1
Iron
Share this question
or