In radscheduler i tried to do something like the example: http://demos.telerik.com/aspnet-ajax/scheduler/examples/customizeappointment/defaultcs.aspx
to show appointments with some of resource information (actually in my case subject is irrelevant, only the resource "program" is important to display).
the problem is that it seems the resources are not binding right, or something else is wrong. I get "none" always, despite the fact that my database hold the value for the resource related. What can be wrong ?
to show appointments with some of resource information (actually in my case subject is irrelevant, only the resource "program" is important to display).
the problem is that it seems the resources are not binding right, or something else is wrong. I get "none" always, despite the fact that my database hold the value for the resource related. What can be wrong ?
<telerik:RadScheduler ID="RadScheduler1" runat="server" DataDescriptionField="Description" DataEndField="end" DataKeyField="id" DataRecurrenceField="RecurenceRule" DataRecurrenceParentKeyField="RecurenceParentId" DataSourceID="SqlDataSource1" DataStartField="Start" DataSubjectField="Subject" EnableDescriptionField="True" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" SelectedView="WeekView"> <ResourceTypes> <telerik:ResourceType DataSourceID="SqlDataSource2" ForeignKeyField="Programid" KeyField="id" Name="Program" TextField="programName" /> </ResourceTypes> <ResourceStyles> <telerik:ResourceStyleMapping ApplyCssClass="rsCategoryBlue" Key="Programid" Text="Program" Type="Program" /> </ResourceStyles> <AppointmentTemplate> <div> <%#Eval("Subject") %></div> <hr /> <div> <asp:Label ID="UserLabel" runat="server" Text=' <%# Container.Appointment.Resources.GetResourceByType("Program") == null ? "None" : Container.Appointment.Resources.GetResourceByType("Program").Text%>' /> </div> </AppointmentTemplate> </telerik:RadScheduler> <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:radiomixConnectionString %>" SelectCommand="SELECT * FROM [Program]"></asp:SqlDataSource> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:radiomixConnectionString %>" DeleteCommand="DELETE FROM [ProgramTimes] WHERE [id] = @id" InsertCommand="INSERT INTO [ProgramTimes] ([Subject], [Start], [end], [Description], [RecurenceRule], [RecurenceParentId], [Programid]) VALUES (@Subject, @Start, @end, @Description, @RecurenceRule, @RecurenceParentId, @Programid)" SelectCommand="SELECT [id], [Subject], [Start], [end], [Description], [RecurenceRule], [RecurenceParentId], [Programid] FROM [ProgramTimes]" UpdateCommand="UPDATE [ProgramTimes] SET [Subject] = @Subject, [Start] = @Start, [end] = @end, [Description] = @Description, [RecurenceRule] = @RecurenceRule, [RecurenceParentId] = @RecurenceParentId, [Programid] = @Programid WHERE [id] = @id"> <DeleteParameters> <asp:Parameter Name="id" Type="Int32" /> </DeleteParameters> <InsertParameters> <asp:Parameter Name="Subject" Type="String" /> <asp:Parameter Name="Start" Type="DateTime" /> <asp:Parameter Name="end" Type="DateTime" /> <asp:Parameter Name="Description" Type="String" /> <asp:Parameter Name="RecurenceRule" Type="String" /> <asp:Parameter Name="RecurenceParentId" Type="Int32" /> <asp:Parameter Name="Programid" Type="Int32" /> </InsertParameters> <UpdateParameters> <asp:Parameter Name="Subject" Type="String" /> <asp:Parameter Name="Start" Type="DateTime" /> <asp:Parameter Name="end" Type="DateTime" /> <asp:Parameter Name="Description" Type="String" /> <asp:Parameter Name="RecurenceRule" Type="String" /> <asp:Parameter Name="RecurenceParentId" Type="Int32" /> <asp:Parameter Name="Programid" Type="Int32" /> <asp:Parameter Name="id" Type="Int32" /> </UpdateParameters> </asp:SqlDataSource>