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

Advanced form

3 Answers 68 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 08 Oct 2010, 02:50 PM
I have a modified xml Appointments file with users added anb I am using the sample project http://www.telerik.com/ClientsFiles/138467_radschedulermvc-demo.zip .
I have selected StartEditingInAdvancedForm="true", the form opens and I see the User dropdown but it is not populated with the users how do I go about this?


<telerik:RadScheduler runat="server" ID="RadScheduler1" Height="100%"
        AllowDelete="False" AllowEdit="False" AllowInsert="False" Skin="Office2007"
            StartEditingInAdvancedForm="true" SelectedView="WeekView"
        DayEndTime="18:00:00" DayStartTime="08:00:00"
            ShowFooter="false" Culture="en-GB">
            <AdvancedForm Modal="true" />
            <ResourceTypes>                   
                    <telerik:ResourceType KeyField="Key" Name="User" TextField="Text" ForeignKeyField="ID"
                        DataSourceID="XmlSchedulerProvider" />
                </ResourceTypes>
        <WebServiceSettings Path="~/Models/SchedulerWebService.asmx" />
    </telerik:RadScheduler>



Thanks

3 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 13 Oct 2010, 04:20 PM
Hi Bob,

The problem is that you are trying to retrieve a Resource with Name="User":

<telerik:ResourceType KeyField="Key" Name="User" TextField="Text" ForeignKeyField="ID"
                        DataSourceID="XmlSchedulerProvider" />

As I can see in your .xml file that XmlProvider uses you have only one resource with Name="Calendar":

<Resources>
    <Calendar>
      <Key>1</Key>
      <Text>Development</Text>
    </Calendar>
    <Calendar>
      <Key>2</Key>
      <Text>Marketing</Text>
    </Calendar>
    <Calendar>
      <Key>3</Key>
      <Text>Personal</Text>
    </Calendar>
    <Calendar>
      <Key>4</Key>
      <Text>Work</Text>
    </Calendar>
  </Resources>

Now to be able to see the the combobox populated - set only the name of the resource:

                <ResourceTypes>
               <telerik:ResourceType Name="Calendar" />
           </ResourceTypes>

Other properties as DataSourceID, KeyField and TextField are needed only if you want to get the resources from different DataSource as in this demo.

Hope this helps.

Greetings,
Veronica MIlcheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Bob
Top achievements
Rank 1
answered on 20 Oct 2010, 10:12 AM
Hi, I have actually changed the XML file, but still I get no users in the drop down box.
<Appointments>
    <NextID>14</NextID>
    <Resources>
        <Room>
            <Key>1</Key>
            <Text>Meeting room 101</Text>
        </Room>
        <Room>
            <Key>2</Key>
            <Text>Meeting room 201</Text>
        </Room>
        <User>
            <Key>1</Key>
            <Text>Alex</Text>
        </User>
        <User>
            <Key>2</Key>
            <Text>Bob</Text>
        </User>
        <User>
            <Key>3</Key>
            <Text>Charlie</Text>
        </User>
    </Resources>
James
0
Veronica
Telerik team
answered on 26 Oct 2010, 09:23 AM
Hello Bob,

Please accept my apologies for the late reply.

You need to specify the ResourcePopulationMode in the WebServiceSettings tag:

<WebServiceSettings Path="~/Models/SchedulerWebService.asmx" ResourcePopulationMode="ServerSide" />

In your case it is ServerSide as you are using a method in the code of your service GetResources:

[WebMethod(EnableSession = true)]
        public IEnumerable<ResourceData> GetResources(SchedulerInfo schedulerInfo)
        {
            return Controller.GetResources(schedulerInfo);
        }

All the best,
Veronica Milcheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Scheduler
Asked by
Bob
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Bob
Top achievements
Rank 1
Share this question
or