I'm following the online example of RadScheduler Timelineview http://demos.telerik.com/aspnet-ajax/scheduler/examples/timelineview/defaultcs.aspx
I've created two sqldatasources, one for the events and other for the resources.
The sqldatasurces have been tested and I get the data OK. To ensure it I bind then to a grid and a dropdownlist and everything seems to be OK.
| <asp:SqlDataSource ID="SqlOcupacion" runat="server" ConnectionString="<%$ ConnectionStrings:iTurnosConnectionString1 %>" SelectCommand="sp_InternacionTurnos_ShowOS" SelectCommandType="StoredProcedure"> |
| <SelectParameters> |
| <asp:SessionParameter Name="pIdObraSocial" SessionField="pIdObraSocial" Type="Int32" /> |
| <asp:SessionParameter Name="pfdesde" SessionField="pfdesde" Type="DateTime" /> |
| <asp:SessionParameter Name="pfhasta" SessionField="pfhasta" Type="DateTime" /> |
| </SelectParameters> |
| </asp:SqlDataSource> |
| <asp:SqlDataSource ID="SqlRecursos" runat="server" ConnectionString="<%$ ConnectionStrings:iTurnosConnectionString1 %>" SelectCommand="sp_InternacionRecursos_Show" SelectCommandType="StoredProcedure"> |
| <SelectParameters> |
| <asp:SessionParameter DefaultValue="" Name="IdInstitucion" SessionField="IdInstitucion" |
| Type="Int32" /> |
| <asp:SessionParameter DefaultValue="" Name="IdInternacionEspecialidad" SessionField="IdInternacionEspecialidad" |
| Type="Int32" /> |
| <asp:Parameter DefaultValue="1" Name="IdInternacionRecurso" Type="Int32" /> |
| </SelectParameters> |
| </asp:SqlDataSource> |
The sqldatasources use as parameters SessionFields. I set then in the Page_Load event of my page.
Here is the code of my RadScheduler
| <telerik:RadScheduler runat="server" ID="SchOcupacionCamas" SelectedView="TimelineView" |
| GroupBy="Camas" GroupingDirection="Vertical" SelectedDate="2008-05-27" DayStartTime="00:00:00" |
| DayEndTime="23:59:00" DataSourceID="SqlOcupacion" |
| DataKeyField="IdInternacionTurno" DataSubjectField="Descripcion" DataStartField="FechaDesde" DataEndField="FechaHasta" |
| OverflowBehavior="Expand" ShowViewTabs="false" TimelineView-NumberOfSlots="4" |
| ColumnWidth="250px" Width="100%" Height="433px" WorkDayEndTime="00:00:00" WorkDayStartTime="00:00:00"> |
| <ResourceTypes> |
| <telerik:ResourceType KeyField="IdInternacionRecurso" Name="Camas" TextField="Descripcion" ForeignKeyField="IdInternacionRecurso" |
| DataSourceID="SqlRecursos" /> |
| </ResourceTypes> |
| <TimelineView GroupBy="Camas" NumberOfSlots="4" ReadOnly="True" /> |
| </telerik:RadScheduler> |
The scheduler draw the resources in the first columns but it dont paint the events. The SQLProfiler makes me sure I'm getting the correct set off data.
Here a snapshot of the retrieved data for the SqlOcupacion Data Source
Here a snapshot of the retrieved data for the SqlRecursosDataSource
Thanks!!!