Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Calendar Control: How to disable hyperlink for a date and how to remove dates from other months

Posted on 2004-04-22
3
Medium Priority
?
805 Views
Last Modified: 2008-02-26
I have a calendar control in which I want to disable hyperlink on few dates based on some values and also I dont want the dates from other months to be displayed.

Can someone help me with this??

Thanks
Jack
0
Comment
Question by:jackrock79
  • 2
3 Comments
 
LVL 28

Accepted Solution

by:
mmarinov earned 750 total points
ID: 10893396
you can use this
private void Calendar1_DayRender(object sender, System.Web.UI.WebControls.DayRenderEventArgs e)
{
      if ( e.Day.Date.Month != DateTime.Now.Month )
      {
          e.Cell.Text = ""; //clears the cell's
      }
      if ( e.Day.Date.Day == 5 )
          e.Day.IsSelectable = false;
}

B..M
0
 
LVL 2

Author Comment

by:jackrock79
ID: 10893763
Thanks for the code
0
 
LVL 28

Expert Comment

by:mmarinov
ID: 10894057
Hi jackrock79, why Grade B - isn't this code what you are looking for ?

B..M
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

782 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