Multiple Resource Values for Recurrence

6 posts, 0 answers
  1. Alan Wang
    Alan Wang avatar
    40 posts
    Member since:
    Jul 2012

    Posted 20 Feb 2012 Link to this post

    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
  2. Alan Wang
    Alan Wang avatar
    40 posts
    Member since:
    Jul 2012

    Posted 22 Feb 2012 Link to this post

    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
  3. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 23 Feb 2012 Link to this post

    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
    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.
  4. Alan Wang
    Alan Wang avatar
    40 posts
    Member since:
    Jul 2012

    Posted 23 Feb 2012 Link to this post

    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:

    <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
  5. Alan Wang
    Alan Wang avatar
    40 posts
    Member since:
    Jul 2012

    Posted 27 Feb 2012 Link to this post

    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
  6. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 01 Mar 2012 Link to this post

    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
    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.
Back to Top