Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Problem with calendar control

Reply
Thread Tools

Problem with calendar control

 
 
Ron Harter
Guest
Posts: n/a
 
      07-03-2009


I am unable to set the width for the day cells in the calendar control. I am
controls to various days for events and have set wrap to false. The problem
I am having is I am getting some really skinny days because they are getting
squeezed. I have tried to set the width in the DayRender handler but an hot
having any luck. Anyone got any suggestions?

-----
Ron Harter | Tongue, Tied and Twisted
http://www.velocityreviews.com/forums/(E-Mail Removed) | Just An Earthbound Misfit ... I
| Pink Floyd

 
Reply With Quote
 
 
 
 
Stan
Guest
Posts: n/a
 
      07-05-2009
On 3 July, 04:21, "Ron Harter" <(E-Mail Removed)> wrote:
> I am unable to set the width for the day cells in the calendar control. Iam
> controls to various days for events and have set wrap to false. The problem
> I am having is I am getting some really skinny days because they are getting
> squeezed. I have tried to set the width in the DayRender handler but an hot
> having any luck. Anyone got any suggestions?
>
> -----
> Ron Harter * * * * * * * * * * | Tongue, Tied and Twisted
> (E-Mail Removed) | Just An Earthbound Misfit ... I
> * * * * * * * * * * * * * * * * * * * * | * * * * * * * Pink Floyd


Hi Ron

I think the problem lay in the fact that day column widths are
normally set using percentages. So, for example, if you set the column
of one of them to a pixel value the browser readjusts the table width
to preserve the ratios of the other columns which results in all
columns still being the same width.

To exercise proper control it is necessary to set the width of each
column explicitly. For example to make Monday twice as wide as the
other days the DayRender event code could be:

if(e.day.DayOfWeek == DayOfWeek.Monday) e.day.cell.width =
Unit.Percentage(25.0);
else e.Cell.DayOfWeek.Width = Unit.Percentage(12.5);

HTH



 
Reply With Quote
 
 
 
 
Stan
Guest
Posts: n/a
 
      07-05-2009
> if(e.day.DayOfWeek == DayOfWeek.Monday) e.day.cell.width =
> Unit.Percentage(25.0);
> else e.Cell.DayOfWeek.Width = Unit.Percentage(12.5);


Oops that should have been:

if(e.day.DayOfWeek == DayOfWeek.Monday)
e.cell.width = Unit.Percentage(25.0);
else e.cell.Width = Unit.Percentage(12.5);

sorry
 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Calendar GadGets does not show calendar iccsi Windows 64bit 4 08-14-2011 01:52 PM
How to Synchronise Hotmail Calendar with Standard Outlook Calendar using Outlook Connector ?? Synapse Syndrome Computer Support 0 12-02-2007 04:19 AM
Thunderbird Calendar with Exchange 2003 Calendar and Public FoldersCalendar jincmcse Firefox 1 09-03-2005 02:46 AM
Calendar Control - Programatically set the calendar to a date range Shevek ASP .Net 3 06-23-2004 01:41 PM
Calendar Control - Programatically set the calendar to a date range Shevek ASP .Net Web Controls 0 06-23-2004 12:06 PM



Advertisments