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

2 posts, 0 answers
  1. Kiran
    Kiran avatar
    1 posts
    Member since:
    May 2014

    Posted 16 May 2014 Link to this post

    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
  2. Plamen
    Admin
    Plamen avatar
    2733 posts

    Posted 21 May 2014 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top