Getting Selected Time

6 posts, 0 answers
  1. Phillip Foster
    Phillip Foster avatar
    58 posts
    Member since:
    Apr 2010

    Posted 03 May 2010 Link to this post

    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!
  2. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 05 May 2010 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Phillip Foster
    Phillip Foster avatar
    58 posts
    Member since:
    Apr 2010

    Posted 05 May 2010 Link to this post

    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!
  5. Dobry Zranchev
    Admin
    Dobry Zranchev avatar
    348 posts

    Posted 10 May 2010 Link to this post

    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.
  6. Phillip Foster
    Phillip Foster avatar
    58 posts
    Member since:
    Apr 2010

    Posted 10 May 2010 Link to this post

    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. 

  7. Dobry Zranchev
    Admin
    Dobry Zranchev avatar
    348 posts

    Posted 11 May 2010 Link to this post

    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.
Back to Top
UI for WinForms is Visual Studio 2017 Ready