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

RadScheduler Resource Type Binding Problem

1 Answer 180 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
sanjayanthan
Top achievements
Rank 1
sanjayanthan asked on 06 Nov 2012, 09:46 AM
Hi friends,

Am using Radscheduler to Book the Employee for the Particular Project, i need to display the Employees in the Left side, on the right side it will list Project Period Date which i mentioned.
am not using any SqlDataSource / ObjectDatasource for Binding, am using only one Dataset which contains Employee List and also the Date Allocated to the Employees

SQL Returns

EMPID        PROJ_CODE      START_DATE           STATUS
-----------------------------------------------------------------------------------------------
00522         APN_PROJ          05-SEP-2012           BOOKED

00522         APN_PROJ          06-SEP-2012           BOOKED

00522         APN_PROJ          NULL                        NULL

00522         APN_PROJ          08-SEP-2012           PENDING


When i binding this it show as like the return from the SQL Values.

Kindly Check the Attached file. for two Dates. it shows two records for me

    <telerik:RadScheduler runat="server" ID="RadScheduler1" GroupBy="RTT_EMP_STAFFID,Start" Skin="Black"  ShowNavigationPane="false" ShowViewTabs="false"
                OverflowBehavior="Auto" TimelineView-HeaderDateFormat="dd-MMM-yyyy" DataKeyField="RTT_EMP_STAFFID"
                TimelineView-ColumnHeaderDateFormat=" ddd - dd"    >                  
                  <ResourceTypes>
                        <telerik:ResourceType KeyField="RTT_EMP_STAFFID"  Name="RTT_EMP_STAFFID" TextField="RTT_EMP_STAFFID" ForeignKeyField="RTT_EMP_STAFFID" ></telerik:ResourceType>
                   </ResourceTypes>
                
            </telerik:RadScheduler>
           


aspx.cs File
==========

 ds_temp = objProjectBooking.GetEmployeeHolidayWeeklyOff(objSessionInfo, "ProjCode", "Activity ID", "", "", "", "", "01-SEP-2012", "31-DEC-2012", "", "E");
                    if (ds_temp.Tables.Count > 0 && ds_temp.Tables[0].Rows.Count > 0)
                    {

                        RadScheduler1.SelectedDate = Convert.ToDateTime("01-SEP-2012");
                        RadScheduler1.SelectedView = SchedulerViewType.TimelineView;
                        RadScheduler1.TimelineView.NumberOfSlots = Convert.ToInt32(10);
                        //RadScheduler1.DataKeyField = "ID";
                        RadScheduler1.DataSubjectField = "Subject";
                        RadScheduler1.DataStartField = "Start";
                        RadScheduler1.DataEndField = "End";
                        RadScheduler1.GroupBy = "RTT_EMP_STAFFID,Start";
                        RadScheduler1.GroupingDirection = GroupingDirection.Vertical;
                        RadScheduler1.DataSource = ds_temp;    
                        RadScheduler1.ResourceTypes[0].DataSource = ds_temp;
                        RadScheduler1.DataBind();                     

                    }


what was the Problem in this kinldly Help me

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 09 Nov 2012, 07:39 AM
Hi,

 
I have inspected the code that you posted. One unusual thing that I noticed is the way GroupBy property is assigned - GroupBy="RTT_EMP_STAFFID,Start" while as it is described in our on-line demo it should not be set to more than one resource(or Date)-In order to enable the resource grouping set the GroupBy property to the name of the resource, for example "Room". In addition, you can also group by date and resource - you need to add the "Date" keyword before the resource name. For example - GroupBy="Date,Room".

You can also review our Bind To List demo where is shown the recommended way of binding appointments and resources in the code behind.

Regards,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
General Discussions
Asked by
sanjayanthan
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or