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

Getting Selected Time

5 Answers 220 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Phillip Foster
Top achievements
Rank 1
Phillip Foster asked on 03 May 2010, 10:14 PM
Hi!
I am new to RadTools, so feel free to laugh. I am using the RadScheduler, however I don't want to use the context menu for adding a new appointment. I would just like to be able to highlight the area and double click (or another shortcut key).   I cannot seem to figure out how to get the highlighted time slot to save the appointment. 

Any suggestions?

Thanks!

5 Answers, 1 is accepted

Sort by
0
Boyko Markov
Telerik team
answered on 05 May 2010, 12:00 PM
Hi Phillip Foster,

Yes, this is a feature that our scheduler does not support yet. However if you double-click a cell the edit-appointment dialog will open and you can enter the needed information. This dialog allows you to create/edit appointments in RadScheduler.

We are considering the addition of this Outlook feature, including in-line appointment creation and editing, which will allow you to do this.

If you need more information, do not hesitate to write us. 

All the best,
Boyko Markov
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.
0
Phillip Foster
Top achievements
Rank 1
answered on 05 May 2010, 05:28 PM
I noticed that the drag and drop example is similar to what i want. When i check that handler it uses the drageventargs and those hold the point of the element, however the mouse points are different when using that same cell. is there a way to apply this type of method for this:

 Point point = this.radScheduler1.PointToClient(new Point(e.X, e.Y)); 
 
            DayViewAppointmentsTable table = (this.radScheduler1.SchedulerElement.ViewElement as SchedulerDayViewElement).DataAreaElement.Table; 
            SchedulerCellElement schedulerCell = SchedulerUIHelper.GetCellAtPoint(point, table.Children); 


Thanks!
0
Dobry Zranchev
Telerik team
answered on 10 May 2010, 01:06 PM
Hello Phillip Foster,

The code in the drag and drop example takes the cell which the mouse points to. I am not sure that this will help you. We already have API to get the selected nodes, but we do not have the functionality to select a cell through the API. Could you give us more details of your whole scenario so that I can try to give you a solution?

Greetings,
Dobry Zranchev
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.
0
Phillip Foster
Top achievements
Rank 1
answered on 10 May 2010, 03:06 PM
In this scenario, the user would highlight the given cells. I would like for them to be able to just hit a shortcut or a button and save that appointment. I don't to make the user type in all the new appointment data because they will be doing thousands and it will all be the same except for the slot and 1 field. The field however is already known at this point in the process.

So basically I want to be able to see what the start and end time is of the highlighted portion on the scheduler. 

0
Dobry Zranchev
Telerik team
answered on 11 May 2010, 09:13 AM
Hello Phillip Foster,

It seems that If I understand your task you want to create appointment as you click in the scheduler or select a cells and create an appointment for the selected dates/times. In this case you should do the following:

1. Subscribe for the ContextMenuShowing event in order to stop showing the context menu:
 
void radScheduler1_ContextMenuShowing(object sender, SchedulerContextMenuShowingEventArgs e)
{
    e.ContextMenu = null;
}
 
2. Subscribe for the AppointmentEditDialogShowing event in order to stop showing the EditAppointmentDialog:
 
void radScheduler1_AppointmentEditDialogShowing(object sender, AppointmentEditDialogShowingEventArgs e)
{
    e.AppointmentEditDialog = null;
}
 
3. Subscribe for the DoubleClick event of the scheduler - here you can create an appointment for the selection (start-end times):
 
void radScheduler1_DoubleClick(object sender, EventArgs e)
{
    DateTime[] dates = SchedulerUIHelper.GetSelectedDates(this.radScheduler1);
    List<DateTime> dts = new List<DateTime>(dates);
    dts.Sort();
 
    SchedulerDayViewBase dayView = this.radScheduler1.ActiveView as SchedulerDayViewBase;
    int minutes = 0;
    if (dayView != null)
    {
        minutes = (int)dayView.RangeFactor;
    }
 
    Appointment appointment = new Appointment(dts[0], dts[dts.Count - 1].AddMinutes(minutes));
    this.radScheduler1.Appointments.Add(appointment);
}
 
You could use that code to create an appointment when you click some button.

I hope this will help you achieve what you need. Feel free to contact us in case you need further assistance.

Regards,
Dobry Zranchev
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.
Tags
Scheduler and Reminder
Asked by
Phillip Foster
Top achievements
Rank 1
Answers by
Boyko Markov
Telerik team
Phillip Foster
Top achievements
Rank 1
Dobry Zranchev
Telerik team
Share this question
or