PC Review


Reply
Thread Tools Rating: Thread Rating: 2 votes, 1.00 average.

Asp.Net Calender, how to display 5 lines if there are only 5 lines in one month?

 
 
Jack
Guest
Posts: n/a
 
      11th Oct 2005
To whom may concern:


In Asp.Net Calender control, how to display 5 lines if there are only 5
lines in one month? Now there are 6 lines even that I don't show the
data in other months.

Thanks in advance!


Jack
2005-10-11

 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      11th Oct 2005
All months which begin on a Friday or a Saturday
need to display 6 lines, because there's 4 complete
weeks and 2 partial weeks in them.

To display a calendar so that the months which *can* display in
5 lines (the months which start on Sun, Mon, Tue, Wed or Thu)
do display in 5 lines, set the ForeColor and BackColor properties
for the "OtherMonthDay Style" to white.

<asp:Calendar ID="Calendar1" runat="server" OtherMonthDayStyle-BackColor="White"
OtherMonthDayStyle-ForeColor="White"></asp:Calendar>

If you have set the Calendar's BackColor to any other color
but white, set the "OtherMonthDay Style" to whatever BackColor
you set the Calendar's BackColor to.



Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Espaņol : http://asp.net.do/foros/
======================================
"Jack" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

> In Asp.Net Calender control, how to display 5 lines if there are only 5
> lines in one month? Now there are 6 lines even that I don't show the
> data in other months.



 
Reply With Quote
 
Jack
Guest
Posts: n/a
 
      12th Oct 2005
Hi, Juan:

It works if I set ShowGridLines = False, but not if ShowGridLines =
True.

 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      12th Oct 2005
Hmmm...that's odd but, if that what it takes, fine.

See the calendar at :

http://asp.net.do/calendario/Calendario.aspx

It's created with only :

<asp:Calendar ID="Calendar1" runat="server" OtherMonthDayStyle-BackColor="White"
OtherMonthDayStyle-ForeColor="White"></asp:Calendar>

I didn't set ShowGridLines = False ... but it works.

In any case, I'm glad it's working, Jack.



Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Espaņol : http://asp.net.do/foros/
======================================
"Jack" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi, Juan:
>
> It works if I set ShowGridLines = False,
> but not if ShowGridLines = True.



 
Reply With Quote
 
Jack
Guest
Posts: n/a
 
      12th Oct 2005
Yes, I know your solution, but my customer need GridLine.

 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      12th Oct 2005
I guess you'll have to write a Calendar of your own, then.

Why would your customer require gridlines ?

Talk your customer out of that.
It's not like gridlines are very functional, anyway.



Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Espaņol : http://asp.net.do/foros/
======================================
"Jack" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Yes, I know your solution, but my customer need GridLine.



 
Reply With Quote
 
Jack
Guest
Posts: n/a
 
      12th Oct 2005
, in fact, I think Calender with GridLine is more beautiful than the
one without GridLine.

 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      12th Oct 2005
But not if it displays unneeded lines, right ?

;-)



Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Espaņol : http://asp.net.do/foros/
======================================
"Jack" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> , in fact, I think Calender with GridLine is more beautiful than the
> one without GridLine.
>



 
Reply With Quote
 
Jack
Guest
Posts: n/a
 
      12th Oct 2005
Yes, that's true, but that's why I post here.
If you can tell me how to custom Calendar, that's better.

 
Reply With Quote
 
Jack
Guest
Posts: n/a
 
      12th Oct 2005
Which method or event in Calendar shall I override?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calender Appointment Entry - Multiple Lines =?Utf-8?B?R2VtVHg=?= Microsoft Outlook Calendar 1 3rd Aug 2007 01:03 AM
Sub to copy only result lines within formula range, omit null string lines Max Microsoft Excel Programming 4 15th Jul 2007 04:21 AM
How do I Remove lines above a key word, remove the lines below another, and keep the lines between the to key words in a Text File? Quentin Microsoft VB .NET 2 20th Apr 2007 07:34 PM
The daily calender in outlook does,nt have horizontal lines? =?Utf-8?B?QWxsYW4gTWF5?= Microsoft Outlook Calendar 5 28th Mar 2007 08:39 PM
How do I print a calender wizard so the lines show =?Utf-8?B?U2FtbXk=?= Microsoft Word Document Management 1 25th Oct 2005 06:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:28 AM.