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

Appointments not showing with resources

1 Answer 101 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 01 Mar 2009, 05:52 AM
Hello.

I'm evaluating this product. I have a very, very simple scenario. I have a resource that I've defined in a resource table. When I hook things up and use the resource, I can see the 2 available resources at the top of the scheduler. I can insert, update, and delete data just fine. However, I cannot get the appointments to show in the scheduler. But when I remove the GroupBy attribute, my appointments show up just fine. I'm wondering what obvious setting I'm missing. Here is my ASPX. I am just using ASPX, no code behind yet:

        <telerik:RadScheduler runat="server" ID="RadScheduler1"
            Width="900px" Skin="Hay" EnableEmbeddedSkins="True" SelectedView="DayView" GroupBy="res" GroupingDirection="Horizontal"
            DayStartTime="08:00:00" DayEndTime="19:00:00" TimeZoneOffset="00:00:00"
            DataSourceID="AppointmentDataSource" DataKeyField="id" DataSubjectField="description"
            DataStartField="start_time" DataEndField="end_time" DataRecurrenceField="recurrence_rule"
            DataRecurrenceParentKeyField="Recurrence_Parent_ID">
            <ResourceTypes>
                <telerik:ResourceType KeyField="id" Name="res" TextField="description" ForeignKeyField="resource_id"
                    DataSourceID="ResourceDataSource" />
            </ResourceTypes>
        </telerik:RadScheduler>

        <asp:SqlDataSource ID="AppointmentDataSource" runat="server"
            ConnectionString="<%$ ConnectionStrings:SchedulerConnectionString %>"
            ProviderName="System.Data.SqlClient"
            SelectCommand="SELECT [id], [description], [start_time], [end_time], [resource_id], [recurrence_rule], [recurrence_parent_id] FROM [appointment]"
            InsertCommand="INSERT INTO [appointment] ([description], [start_time], [end_time], [resource_id], [recurrence_rule], [recurrence_parent_id]) VALUES (@Description, @start_time, @end_time, @resource_id, @recurrence_rule, @recurrence_parent_id)"
            UpdateCommand="UPDATE [appointment] SET [description] = @description, [start_time] = @start_time, [end_time] = @end_time, [resource_id] = @resource_id, [recurrence_rule] = @recurrence_rule, [recurrence_parent_id] = @recurrence_parent_id WHERE (id = @ID)"
            DeleteCommand="DELETE FROM [appointment] WHERE [id] = @ID">
            <DeleteParameters>
                <asp:Parameter Name="id" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="id" Type="Int32" />
                <asp:Parameter Name="description" Type="String" />
                <asp:Parameter Name="start_time" Type="DateTime" />
                <asp:Parameter Name="end_time" Type="DateTime" />
                <asp:Parameter Name="resource_id" Type="Int32" />
                <asp:Parameter Name="recurrence_rule" Type="String" />
                <asp:Parameter Name="recurrence_parent_id" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="description" Type="String" />
                <asp:Parameter Name="start_time" Type="DateTime" />
                <asp:Parameter Name="end_time" Type="DateTime" />
                <asp:Parameter Name="resource_id" Type="Int32" />
                <asp:Parameter Name="recurrence_rule" Type="String" />
                <asp:Parameter Name="recurrence_parent_id" Type="Int32" />
            </InsertParameters>
        </asp:SqlDataSource>

        <asp:SqlDataSource ID="ResourceDataSource" runat="server"
            ProviderName="System.Data.SqlClient"
            ConnectionString="<%$ ConnectionStrings:SchedulerConnectionString %>"
            SelectCommand="SELECT [id], [description], [create_date], [update_date] FROM [resource]"></asp:SqlDataSource>

1 Answer, 1 is accepted

Sort by
0
Brian
Top achievements
Rank 1
answered on 22 Mar 2009, 10:49 PM
In case anyone makes the same bone-headed mistake, I thought I'd post a reply. My issue was that the joined resource_id was not created as an int. It was created as a varchar. So when it tried to do the join, it failed. This issue drove me crazy for more hours than I'd care to admit. I went back and recreated my tables. It was then that I realized my mistake.
Tags
Scheduler
Asked by
Brian
Top achievements
Rank 1
Answers by
Brian
Top achievements
Rank 1
Share this question
or