Solved

Seleted mode

Posted on 2004-10-14
3
233 Views
Last Modified: 2010-04-15
Hi Experts,

How do I get value of CalendarSelectionMode and recognize which mode was used week, weekday. dayweekmonth ?

Thanks.
0
Comment
Question by:fpoyavo
3 Comments
 
LVL 1

Author Comment

by:fpoyavo
ID: 12310543
I HAVE FOUND IT : MyCalendar.SelectedDates

Thanks to all.
0
 
LVL 8

Expert Comment

by:Razzie_
ID: 12310666
Glad you found it fpoyavo!

To get your points refunded, please go to the Community Support TA and ask to Close and refund this question and a moderator will close it.

Cheers,

Razzie
0
 
LVL 3

Accepted Solution

by:
aacool earned 250 total points
ID: 12310694
The SelectionMode property for a Calendar web control returns a value of the enum System.Web.UI.WebControls.CalendarSelectionMode

This can have the values CalendarSelectionMode.Day,CalendarSelectionMode.Week,CalendarSelectionMode.DayWeekMonth or CalendarSelectionMode.None

To set the value, e.g.
      void Selection_Change(Object sender, EventArgs e)
      {

         // Set the day selection mode.
         Calendar1.SelectionMode =
            (CalendarSelectionMode)ModeList.SelectedIndex;

      }


To get the value in C#
 void Selection_Change(Object sender,EventArgs e)
{
        CalendarSelectionMode selectedMode = Calendar1.SelectionMode;
        switch(selectedMode)
        {
           case CalendarSelectionMode.Day:
                                                               //do day processing
                                                             break;
           case CalendarSelectionMode.Week:
                                                              // do week processing
                                                             break;
           case CalendarSelectionMode.DayWeekMonth:
                                                              // do month processing
                                                              break;
        }
}

Hope this addresses your question.
aacool
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
detecting  the added row index in a datagridview 3 70
Entity Framework 7 41
Wav problem 4 25
FTP file download using c# 3 21
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now