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

how to get Start time on mouseclick+RadScheduler

1 Answer 58 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Arun
Top achievements
Rank 1
Arun asked on 24 Sep 2012, 01:27 PM
How do I get Start time from RadSchedule on mouse-click? I need to assign that value to RadDateTimePicker in another div in same page.  Using vb.net, VS2010. 

Thanks in advance

1 Answer, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 24 Sep 2012, 04:14 PM
Hello,


function ClientTimeSlotClick(sender, args) {
                // Access your start time here
                alert(args.get_time());
            }
<telerik:RadScheduler ID="RadScheduler1" runat="server" OnClientTimeSlotClick="ClientTimeSlotClick">
       </telerik:RadScheduler>
protected void Page_Load(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("ID", typeof(Int32));
            dt.Columns.Add("Name", typeof(string));
            dt.Columns.Add("StartDate", typeof(DateTime));
            dt.Columns.Add("EndDate", typeof(DateTime));
            dt.Rows.Add(1, "Name1", DateTime.Now.AddHours(0), DateTime.Now.AddHours(1));
            dt.Rows.Add(2, "Name2", DateTime.Now.AddHours(2), DateTime.Now.AddHours(3));
            RadScheduler1.DataSource = dt;
            RadScheduler1.DataKeyField = "ID";
            RadScheduler1.DataSubjectField = "Name";
            RadScheduler1.DataStartField = "StartDate";
            RadScheduler1.DataEndField = "EndDate";
            RadScheduler1.DataBind();
        }


Thanks,
Jayesh Goyani
Tags
General Discussions
Asked by
Arun
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Share this question
or