Group by Resource

3 posts, 0 answers
  1. Vuyiswa Maseko
    Vuyiswa Maseko avatar
    187 posts
    Member since:
    Jan 2010

    Posted 23 Jun 2010 Link to this post

    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. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 25 Jun 2010 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Vuyiswa Maseko
    Vuyiswa Maseko avatar
    187 posts
    Member since:
    Jan 2010

    Posted 25 Jun 2010 Link to this post

    Thanks :) its working  now.


Back to Top