HI,
I tried Implementing A Provider That Supports Multi-valued Resources. It works fine for appointment without recurrence. When I switch from day view to week view it will show following message if there is an appointment with recurrence.
Error: Sys.WebForms.PageRequestManagerServerErrorException: Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.
By the way, I tried to create a appointment with recurrence on your demo site using following link. It also throws exception:
http://demos.telerik.com/aspnet-ajax/scheduler/examples/multipleresourcevalues/defaultcs.aspx
Please let me know how to fix this
Alan
I tried Implementing A Provider That Supports Multi-valued Resources. It works fine for appointment without recurrence. When I switch from day view to week view it will show following message if there is an appointment with recurrence.
Error: Sys.WebForms.PageRequestManagerServerErrorException: Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.
By the way, I tried to create a appointment with recurrence on your demo site using following link. It also throws exception:
http://demos.telerik.com/aspnet-ajax/scheduler/examples/multipleresourcevalues/defaultcs.aspx
Please let me know how to fix this
Alan
5 Answers, 1 is accepted
0

Alan Wang
Top achievements
Rank 1
answered on 22 Feb 2012, 09:06 PM
Hi,
Just wondering if anyone from Telerik look into this bug. I tried myself for last two days and still no luck. I don't even know where throw the exceptions. This is very important to me. Please let me know if anyone figure out what wrong with it.
Thanks in advanced
Alan
Just wondering if anyone from Telerik look into this bug. I tried myself for last two days and still no luck. I don't even know where throw the exceptions. This is very important to me. Please let me know if anyone figure out what wrong with it.
Thanks in advanced
Alan
0
Hi Alan,
I tested the case with the attached sample, but I was not able to replicate the problem. Could you please examine the demo and let me know what is different with your implementation?
Kind regards,
Peter
the Telerik team
I tested the case with the attached sample, but I was not able to replicate the problem. Could you please examine the demo and let me know what is different with your implementation?
Kind regards,
Peter
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

Alan Wang
Top achievements
Rank 1
answered on 23 Feb 2012, 07:28 PM
Hi Peter,
Thanks for your reply.
I finally figure out what cause the problem. Here is my Scenario. In my scheduler, I have Appointment Template as following:
Then I have event on appointment created find the hyperlink, enable/disable the hyperlink based on resources value, following is the code for AppointmentCreated event:
Thanks for your reply.
I finally figure out what cause the problem. Here is my Scenario. In my scheduler, I have Appointment Template as following:
<
AppointmentTemplate
>
<
asp:HyperLink
ID
=
"lnkCase"
runat
=
"server"
ImageUrl
=
"~/Images/ViewCase_16.jpeg"
></
asp:HyperLink
>
<%# Eval("Subject")%>
</
AppointmentTemplate
>
Then I have event on appointment created find the hyperlink, enable/disable the hyperlink based on resources value, following is the code for AppointmentCreated event:
protected
void
schedulerAppt_AppointmentCreated(
object
sender, AppointmentCreatedEventArgs e) {
HyperLink lnkCase = (HyperLink)e.Container.FindControl(
"lnkCase"
);
if
(e.Appointment.Resources.GetResourceByType(
"Case"
).Key.ToString().CompareTo(
"0"
) == 0 ||
e.Appointment.Resources.GetResourceByType(
"Case"
).Key.ToString().CompareTo(
""
) == 0) {
lnkCase.Visible =
false
;
}
else
{
lnkCase.Target =
"_blank"
;
lnkCase.NavigateUrl =
"~/Case/Case.aspx?id="
+ e.Appointment.Resources.GetResourceByType(
"Case"
).Key.ToString();
}
}
If I take appointmentcreated event out, everything works fine.
Please help me, I need the hyperlink inside the appointment.
Thanks again
Alan
0

Alan Wang
Top achievements
Rank 1
answered on 27 Feb 2012, 09:22 PM
Hi Peter,
Wondering if you got a chance to looking into my scenario yet.
Please let me know if you have a solution.
Thanks in advance!
Alan
Wondering if you got a chance to looking into my scenario yet.
Please let me know if you have a solution.
Thanks in advance!
Alan
0
Hi Alan,
We cannot replicate this problem following the approach that you have used. If you can send us a simple working sample of the issue via a support ticket or any other file sharing mean, we will look into it and try help you.
Greetings,
Peter
the Telerik team
We cannot replicate this problem following the approach that you have used. If you can send us a simple working sample of the issue via a support ticket or any other file sharing mean, we will look into it and try help you.
Greetings,
Peter
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.