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

Doubleclick event

3 Answers 144 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
Lasse
Top achievements
Rank 1
Lasse asked on 17 Nov 2011, 10:18 AM
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

3 Answers, 1 is accepted

Sort by
0
Ivan Todorov
Telerik team
answered on 18 Nov 2011, 10:50 AM
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.

0
Kiranmayee
Top achievements
Rank 1
answered on 07 Aug 2018, 08:34 PM

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.

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 08 Aug 2018, 04:53 AM
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.
Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
Lasse
Top achievements
Rank 1
Answers by
Ivan Todorov
Telerik team
Kiranmayee
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or