Solved

Seleted mode

Posted on 2004-10-14
3
235 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

756 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