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

I want to Show Time wise data from Database on RadScheduler in Week and Day View

1 Answer 63 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Kiran
Top achievements
Rank 1
Kiran asked on 16 May 2014, 06:12 AM
I have record for appointment
1.Meeting   StartDate 16-5-2014 ,EndDate 18-5-2014 ,start time 04:00:00,end time 10:00:00
2.Conferenece  StartDate 19-5-2014 ,EndDate 25-5-2014 ,start time 08:00:00,end time 12:00:00
so In week view i want to show Scheduling bar for Date 16-5-2014(meeting)..bar starts on 4am to 10am,and for date 19(for conference) Time bar shows from 8 am to 12 pm.

my source code is :

  protected void BindSchedule()
        {
            try
            {
                ProjectController obj = new ProjectController();
                DataSet ds = new DataSet();
                ds = obj.GetActSch();//UserId
                if (ds != null)
                {
                    if (ds.Tables[0].Rows.Count != 0)
                    {
                   for (int i = 0; i <= ds.Tables[0].Rows.Count-1; i++)
                            {
                                RadSchedular1.DataSource = ds; //ds.Tables[0].DefaultView;
                                string StrtTm = ds.Tables[0].Rows[i]["StrtTm"].ToString();
                                string EndTm = ds.Tables[0].Rows[i]["EndTm"].ToString();
                                TimeSpan ts1 = TimeSpan.Parse(StrtTm);
                                TimeSpan ts2 = TimeSpan.Parse(EndTm);
                                RadSchedular1.DayStartTime = ts1;
                                RadSchedular1.DayEndTime = ts2;
                                RadSchedular1.TimeZoneOffset = ts1;
                                   RadSchedular1.DataBind();
                                
                            }
                        }
                }
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }

I GOT ISSUE ..last value in my dataset is reflected for all appointments..
please do needful..Thank You

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 21 May 2014, 05:24 AM
Hi Kiran,

In your scenario you can use daily recurrence appointments for both appointments and the will be shown for every day in both week and day Views.
You can refer to this help topic where is provided more information about how we recommend binding RadScheduler in the code behind.

Regards,
Plamen
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Scheduler
Asked by
Kiran
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or