Doubleclick event

4 posts, 0 answers
  1. Lasse
    Lasse avatar
    21 posts
    Member since:
    Jul 2011

    Posted 17 Nov 2011 Link to this post

    Hi,

    I'm using the radCalendar control. When i doubleclick a date, i want to add the clicked date to a collection.
    The problem is that i don't know if it is a date or some other place on the control I have double clicked, eg. when i click on the arrows to change month, if i do this to fast, the control fires a  "double click" event.

    Is there any way to decide if i clicked a date or some other place on the control? 

    Regards
    Svein Thomas
  2. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 18 Nov 2011 Link to this post

    Hello Svein Thomas,

    Thank you for contacting us.

    You can achieve this by subscribing to the MouseDoubleClick event of RadCalendar and handle it as it is demonstrated below:

    private void radCalendar1_MouseDoubleClick(object sender, MouseEventArgs e)
    {
        CalendarCellElement cell = (this.radCalendar1.ElementTree.GetElementAtPoint(e.Location) as CalendarCellElement);
        if (cell != null && !cell.VisualState.Contains("Header"))
        {
            list.Add(cell.Date);
        }
    }

    Should you have any further questions, feel free to ask. Best wishes,
    Ivan Todorov
    the Telerik team

    Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

  3. Kiranmayee
    Kiranmayee avatar
    22 posts
    Member since:
    Jul 2018

    Posted 07 Aug 2018 Link to this post

    Hi,

    May I know what exactly goes on the ASPX side. I tried MouseDoubleClick on the radcalendar and it doesn't recognize that.

    <telerik:RadCalendar ID="RadCalendar1" Runat="server" Skin="BlackMetroTouch" Width="400px" DayNameFormat="Short" ShowRowHeaders="False" EnableWeekends="True" 
                        FastNavigationNextText="&amp;lt;&amp;lt;" SelectedDate="" AutoPostBack="True">
                        <WeekendDayStyle CssClass="rcWeekend"></WeekendDayStyle>
                        <CalendarTableStyle CssClass="rcMainTable"></CalendarTableStyle>
                        <OtherMonthDayStyle CssClass="rcOtherMonth"></OtherMonthDayStyle>
                        <OutOfRangeDayStyle CssClass="rcOutOfRange"></OutOfRangeDayStyle>
                        <DisabledDayStyle CssClass="rcDisabled"></DisabledDayStyle>
                        <SelectedDayStyle CssClass="rcSelected"></SelectedDayStyle>
                        <DayOverStyle CssClass="rcHover"></DayOverStyle>
                        <FastNavigationStyle CssClass="RadCalendarMonthView RadCalendarMonthView_BlackMetroTouch"></FastNavigationStyle>
                        <ViewSelectorStyle CssClass="rcViewSel"></ViewSelectorStyle>
                    </telerik:RadCalendar>

    Thank you.

  4. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    4086 posts

    Posted 07 Aug 2018 Link to this post

    Hello, Kiranmayee,       

    Note that this forum is related to the Telerik UI for WinForms suite. However, it seems that your question is regarding the RadCalendar control from the ASP suite. Feel free to post your technical inquiries in the relevant forum: https://www.telerik.com/forums
    Thus, the appropriate community will gladly assist you.

    Thank you for your understanding.

    Regards,
    Dess
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top