Hi,
m new user of telerik i want to change the behaviour of Scheduler Appointment Click. on appointment click i want to open a RadWindow having information of that appointment and the resource detail by joining other tables from database..
Plz reply me how to achive that behaviour by using C#
m new user of telerik i want to change the behaviour of Scheduler Appointment Click. on appointment click i want to open a RadWindow having information of that appointment and the resource detail by joining other tables from database..
Plz reply me how to achive that behaviour by using C#
4 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 23 Jan 2012, 06:17 AM
Hello Sohail,
You can invoke ajax request in OnClientAppointmentClick and then create a RadWindow. Here is the sample code.
aspx:
JS:
C#:
-Shinu.
You can invoke ajax request in OnClientAppointmentClick and then create a RadWindow. Here is the sample code.
aspx:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadScheduler1" /> <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings>
</telerik:RadAjaxManager> <telerik:RadWindowManager ID="RadWindowManager1" runat="server"> </telerik:RadWindowManager><script type="text/javascript">
function OnClientAppointmentClick(sender, args) { var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>"); ajaxManager.ajaxRequest(args.get_appointment().get_subject()); }</script>protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e) { string AppointmentSubject = e.Argument; RadWindow window1 = new RadWindow(); RadWindowManager1.Windows.Add(window1); window1.VisibleOnPageLoad = true; }-Shinu.
0
Sohail
Top achievements
Rank 1
answered on 23 Jan 2012, 07:24 PM
Thanks Shinu For reply..
i did wht u have told but i got this exception
Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
Source Error:
Stack Trace:
Kindly let me know how to resolve this.
Thanks
i did wht u have told but i got this exception
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
Source Error:
An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
|
Stack Trace:
|
Thanks
0
Sohail
Top achievements
Rank 1
answered on 23 Jan 2012, 07:42 PM
hi
i resolve this problem by using RadCode Block and wrap my script tag in code block. but now when i run my scheduler no event respond e.g if i click on time line no new appointment window appear and not a single thing of RadScheduler is working
i resolve this problem by using RadCode Block and wrap my script tag in code block. but now when i run my scheduler no event respond e.g if i click on time line no new appointment window appear and not a single thing of RadScheduler is working
0
Shinu
Top achievements
Rank 2
answered on 24 Jan 2012, 05:54 AM
Hello Sohail,
Placing the script in RadCodeBlock worked as expected in my end. If you are using some global javascript, make sure that you refer the javascript accordingly.
-Shinu.
Placing the script in RadCodeBlock worked as expected in my end. If you are using some global javascript, make sure that you refer the javascript accordingly.
-Shinu.