?
Solved

Customize ASP.NET's Calendar-control

Posted on 2002-04-01
7
Medium Priority
?
638 Views
Last Modified: 2008-01-09
In ASP.NET I would like to change to SelectWeekText to actual weeknumbers. Default is to set this property to some static HTML text, but in the OnDayRender event you can customize some more. I would like to change the text in the cell to the left which contains links to select the whole week, to contain weeknumbers.

BRAINSTORM ME! Thx...
0
Comment
Question by:snoffy
[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
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 23

Expert Comment

by:naveenkohli
ID: 6910343
What have you tried so far?
The text that you set for SelecteWeekText can be anything from a static text to an actual HTML tag.

StaticWeekText = "Next"

or

StaticWeekText = ">img src="foo.jpg"<"

So in OnDayRender, you can always set the attribute for the cell so that it gets aligned left. Is that what you are looking for?
0
 
LVL 20

Expert Comment

by:Silvers5
ID: 6910454
will you be more specific about the cell and post some code
0
 

Author Comment

by:snoffy
ID: 6910497
Picture this:
You add a Calendar control to your page.
You set the property SelectMode = "DayWeek".
You set the SelectWeekText = "WEEK".

Now you have a calendar control in which you can either select a specific day OR select a whole week by clicking the text WEEK which we declared above.

Now, I want the text WEEK replaced by the actual numer of the week for the weeks displayed in the calendar.

So instead of having a calendar with 6 links saying "WEEK" to select that week, I would like to have 6 links saying "week 14", "week 15", "week 16" and so on.

I tried refering to the "WEEK" cell in OnDayRender but it only triggers on DAY-cells, not on the week-cell.

Get it...?
0
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.

 
LVL 23

Accepted Solution

by:
naveenkohli earned 1200 total points
ID: 6916714
It seems you are out of luck for this. BEcause Calendar control does have any event for week selectors. If you look at the implementation of Calendar control, you will find that it does not allow for customization of the selector cells other than that you can specify the text or html tags that you want to display.
0
 

Author Comment

by:snoffy
ID: 6917946
I thought of implementing a javascript in SelectWeekText which creates a unique weeknumber for each run. I tried it quick'n'dirty and it should work, I only made it increment a number, but that number could be weeknumbers. So that works, but not in a pretty way.
0
 
LVL 58

Expert Comment

by:Gary
ID: 8830748
This question has been abandoned. I will make a recommendation to the moderators on its resolution in a week or two. I appreciate any comments that would help me to make a recommendation.

In the absence of responses, I may recommend DELETE unless it is clear to me that it has value as a PAQ. Silence = you don't care

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

GaryC123
EE Cleanup Volunteer
0
 
LVL 58

Expert Comment

by:Gary
ID: 8866596
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
To be deleted and points forfeited
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
GaryC123
EE Cleanup Volunteer
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

762 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