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

Group by Resource

2 Answers 130 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Vuyiswa
Top achievements
Rank 2
Vuyiswa asked on 23 Jun 2010, 01:56 PM
Good Day

i have only a week to Prove that Telerik is Good for our need for schedular. i am must say i struggle to get a reply from the forum.

i followed the Demo , but my time-line View does not show my DY as it is shown in that Demo example, But Defination of the Radschedule is like this

        <telerik:RadScheduler ID="RadScheduler1" ColumnWidth="200px" RowHeaderWidth="200px" DayView-GroupingDirection="Vertical" RowHeaderHeight="400px"  runat="server" DataSourceID="SqlDataSource2" 
            DataEndField="ENDDATE" DataKeyField="ID"  Skin="Sunset" Height="300px" Width="1600px" DataSubjectField="SUBJECTS"  DataStartField="STARTDATE" AllowDelete="False" AllowEdit="False" AllowInsert="False"   DayEndTime="20:00:00" DisplayRecurrenceActionDialogOnMove="True" OverflowBehavior="Expand" SelectedView="MonthView"  OnDataBound="RadScheduler1_DataBound" OnAppointmentCreated="RadScheduler1_AppointmentCreated" CssClass="ConfigurationPanel1" OnTimeSlotCreated="RadScheduler1_TimeSlotCreated" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" GroupingDirection="Vertical"
            <MultiDayView UserSelectable="True"    ReadOnly="True" GroupBy="DY" GroupingDirection="Vertical" /> 
             <ResourceTypes> 
            <telerik:ResourceType KeyField="DY" AllowMultipleValues="True" Name="DY" TextField="DY" ForeignKeyField="ID" 
            DataSourceID="SQlDataSource_Grouping" /> 
            </ResourceTypes> 
        </telerik:RadScheduler> 

and the Definition of my SQDatasource Control is
 <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="Data Source=(local);Initial Catalog=oDirectv3;Persist Security Info=True;User ID=o;Password=abacus" 
            SelectCommand="sp_Timetable_View" DeleteCommand="sp_Timetable_View" ProviderName="<%$ ConnectionStrings:DBConnectionString.ProviderName %>" DeleteCommandType="StoredProcedure" SelectCommandType="StoredProcedure" OnSelecting="SqlDataSource2_Selecting"
            <SelectParameters> 
                <asp:SessionParameter DefaultValue="" Name="selectionType" SessionField="viewOptions" 
                    Type="String" /> 
                <asp:SessionParameter DefaultValue="" Name="selectedItems" SessionField="selectedItems" 
                    Type="String" /> 
                <asp:SessionParameter DefaultValue="" Name="selectedTerms" SessionField="selectedTerms" 
                    Type="String" /> 
            </SelectParameters> 
            <DeleteParameters> 
                <asp:Parameter Name="selectionType" Type="String" /> 
                <asp:Parameter Name="selectedItems" Type="String" /> 
                <asp:Parameter Name="selectedTerms" Type="String" /> 
            </DeleteParameters> 
        </asp:SqlDataSource> 
        <asp:SqlDataSource ID="SQlDataSource_Grouping" runat="server" ConnectionString="<%$ ConnectionStrings:ViewerTestConnectionString %>" 
            SelectCommand="select ID,DY from final_Timetable"  ProviderName="<%$ ConnectionStrings:ViewerTestConnectionString.ProviderName %>" OnSelecting="SqlDataSource2_Selecting"
            <DeleteParameters> 
                <asp:Parameter Name="selectionType" Type="String" /> 
                <asp:Parameter Name="selectedItems" Type="String" /> 
                <asp:Parameter Name="selectedTerms" Type="String" /> 
            </DeleteParameters> 
        </asp:SqlDataSource> 

and my page load event on the server side looks like this

    protected void Page_Load(object sender, EventArgs e) 
    { 
        if (!Page.IsPostBack) 
        { 
            BLL.BLL obj = new BLL.BLL(); 
            try 
            { 
                int Day = obj.Get_Max_Day_Viewer(Convert.ToString(Session["ActiveDatabase"])); 
 
                //RadScheduler1.WeekView. = Day; 
 
                RadScheduler1.TimelineView.NumberOfSlots = Day; 
                //it makes sure that the Viewer is showing the date of the timetable  
                RadScheduler1.SelectedDate = obj.Get_Selected_Date_Viewer(Convert.ToString(Session["ActiveDatabase"])); 
                RadScheduler1.TimelineView.GroupingDirection = Telerik.Web.UI.GroupingDirection.Vertical; 
 
            } 
            catch (SqlException ex) 
            { 
                lblMessage.Visible = true
 
                lblMessage.Text = ex.InnerException.Message; 
 
            } 
            finally 
            { 
                obj = null
            } 
        } 
      
    } 

and i have attached the TimelineView image, on the Left hand side does not Contain the "DY" Fields , as Periods.






Thanks




2 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 25 Jun 2010, 11:18 AM
Hello Vuyiswa,

You have set the GroupBy property only for MultiDayView. You need to set it for TimelineView as well -
<TimelineView GroupBy="DY" />


Kind regards,
Peter
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
Vuyiswa
Top achievements
Rank 2
answered on 25 Jun 2010, 11:22 AM
Thanks :) its working  now.


Tags
Scheduler
Asked by
Vuyiswa
Top achievements
Rank 2
Answers by
Peter
Telerik team
Vuyiswa
Top achievements
Rank 2
Share this question
or