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

Display clicked date on Radwindow from RadCalendar

2 Answers 79 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Brown
Top achievements
Rank 1
Brown asked on 06 Jan 2011, 08:14 PM
Hi ,

 I am using Radcalendar , while click on the particular date radwindow is opening, i need to display that particular date on the radwindow.
 tell me how to do?

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 07 Jan 2011, 08:16 AM
Hello Brown,

You can attatch OnDateClick event to open the window and pass the selected date as url parameter .Here is the sample code.

aspx:
<telerik:RadWindow runat="server" ShowContentDuringLoad="False" ReloadOnShow="true"
            Title="Trend Report - Select Scope Objects" AutoSize="false" ID="RadWindowAddTrendScopeObjects"
           NavigateUrl="Dialog.aspx"
</telerik:RadWindow>
<telerik:RadCalendar ID="dd" runat="server" ><ClientEvents OnDateClick="OnDateClick" />
</
telerik:RadCalendar>

Javascript:
function OnDateClick(sender, args)
{
       var date;
       var oWnd = $find('<%=RadWindowAddTrendScopeObjects.ClientID %>');
       date = args.get_renderDay().get_date();
       oWnd.setUrl('Dialog.aspx?param1='+date);
       oWnd.show();
 
   }

And on the Dialog.aspx access the value and set the label text
C#:
protected void Page_Load(object sender, EventArgs e)
  {
      string a = Request.QueryString["Param1"];
      Label1.Text = a;
  }

Thanks,
Shinu.
0
Brown
Top achievements
Rank 1
answered on 07 Jan 2011, 12:48 PM
Thanks . i did the same way...
Tags
Calendar
Asked by
Brown
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Brown
Top achievements
Rank 1
Share this question
or