ResourceType & GroupBy error

5 posts, 0 answers
  1. Piyush Bhatt
    Piyush Bhatt avatar
    166 posts
    Member since:
    Nov 2007

    Posted 15 Jan 2008 Link to this post

    I have a sample RadScheduler as follows. When I put the AdvancedEditTemplate it gives me below error. When I add RadAjaxManager, it gives me error too. If I don't  use RadAjaxManager and AdvancedEditTemplate, it displays the scheduler fine.  What should I do?

    Could not find ResourceType selected for grouping. Please, check that the GroupBy attribute is properly set and a ResourceType with the same name exists.

        <telerik:RadScheduler ID="RadScheduler1" runat="server"
            Skin="Office2007"
            SelectedView="ResourceView"
            AllowDelete="False"
            AllowEdit="True"
            AllowInsert="False"
            DataStartField="Start"
            DataEndField="End" DataKeyField="AptId"
            MinutesPerRow="5"
            DataSourceID="AptSource" DataSubjectField="Act"
            FirstDayOfWeek="Sunday" LastDayOfWeek="Saturday"
            OverflowBehavior="Scroll"
            >
            <ResourceTypes>
                <telerik:ResourceType DataSourceID="PhySource"
                        Name="Physician" TextField="Name" KeyField="PhyId"
                        ForeignKeyField="PhyId" />
            </ResourceTypes>
    <%--        <AdvancedEditTemplate>
            <asp:Panel ID="pnlEdit" runat="server">
                Patient Name: <asp:TextBox ID="txtName" runat="server" />
                Activity: <asp:TextBox ID="TextBox1" runat="server" />
                Start Time: <asp:TextBox ID="TextBox2" runat="server" />
                End Time: <asp:TextBox ID="TextBox3" runat="server" />
            </asp:Panel>   
            </AdvancedEditTemplate>
    --%>        <AppointmentTemplate>
                <asp:Panel ID="pnlSlot" runat="server">
                <span style="background-color:Yellow;">Troy</span>
                <span style="background-color:Blue;">Livonia</span>
                <span style="background-color:Green;">Novi</span>
                </asp:Panel>
            </AppointmentTemplate>
        </telerik:RadScheduler>   


  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 16 Jan 2008 Link to this post

    Hello Piyush,

    We tried to recreate the problem using your code but withoud success. Everything worked as expected in our local tests. Do you have a working demo project which you can send to us via a support ticket?


    Kind regards,
    Peter
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 16 Jan 2008 Link to this post

    Hello Piyush,

    After further testing, we found that the problem appears only design-time. Other than that, the application compiles and runs as expected. Do you get design-time only error at your side as well?

    We will log this problem and try to resolve it as soon as possible. Thanks for your post.


    Best wishes,
    Peter
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. Piyush Bhatt
    Piyush Bhatt avatar
    166 posts
    Member since:
    Nov 2007

    Posted 17 Jan 2008 Link to this post

    Seriously! Something is weird! Because to send you code I again opened up that test project and executed and boom - it's working too. I swear I did not change anything since the last time I wrote you.

    Anyhow, this is good.

    Also, I see 'Resource View' too. But when I display resource view, the 'Day, Week, Month" don't display as buttons. And when I display 'D/W/M' view then 'Resource' does not display as button. Is there a way I can control what buttons to display there?

    Other requirement I have is to 'control' whether any appointment can be edited or not and dragged/drop or not. There is a AllowEdit which seems to work globally for the whole scheduler. I need this control for each appointment.

    So far, I love this control.

    Thanks,
    Piyush Bhatt.
  6. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 18 Jan 2008 Link to this post

    Hi Piyush,

    When SelectedView = "ResourceView", the buttons for other views are not shown - this is by design. However, we will consider changing this for the Q1 2008 release so that you can control what buttons to display for the various views of RadScheduler.

    As for the other question, you can use Custom Attributes and set the AllowEdit property of the appointment in the AppointmentDataBound event as in the following code sample:

     protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e)  
        {  
            e.Appointment.AllowEdit = e.Appointment.Attributes["Editable"]; 
              
        } 

    I hope this helps. Let us know if you have any other questions.


    All the best,
    Peter
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017