Re: Clearing the days of anydata

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On 3 July, 00:39, "Ron Harter" <rdhar...@xxxxxxxxxxx> wrote:
I am new to ASP .Net and still learning so please bear with me. I have a
calendar control where I need the days that are not part of the current
month to be empty. I can't find anything in the documentation on how to do
this so I ended up setting the foreground and background color to be the
same for the OtherMonthDayStyle. Data is still being rendered in the cell
for that day but it is invisible.

This seems kludgey to me and I was wondering of anyone has a cleaner way to
not show anything.

-----
Ron Harter                     | Tongue, Tied and Twisted
rdhar...@xxxxxxxxxxx | Just An Earthbound Misfit ... I
                                        |               Pink Floyd

Try this in the RenderDay event

if (e.Day.IsOtherMonth)
{
e.Cell.Controls.Clear(); // remove the date selector link
button
e.Cell.Text = "&nbsp;"; // insert a placeholder for the
empty cell
}

Note that since the calendar is rendered as a table, the empty cell
must contain something to preserve the structure. Hence the &nbsp;
character (non-break space).
.



Relevant Pages

  • RE: Formula help
    ... Glad I could help, Mike. ... D1 is not equal to nothing, or then not equal to an empty cell. ... figure out how Excel would trap conditions. ...
    (microsoft.public.excel.misc)
  • Re: select rows until empty found
    ... Dim pIndex as long ... Dim pRange as Word.Range ... 'Find row with empty cell in column 2 ... As it is the code will fail if there are no empty ...
    (microsoft.public.word.tables)
  • Re: counting unique items
    ... COUNTIFwill return 0 for that empty cell. ... Put some random entries in A1:A5. ... string from the Countif formulas and delete some of the entries in A1:A5. ...
    (microsoft.public.excel.misc)
  • Re: Average per block
    ... Dim iLastRow As Long ... Dim istart As Long ... row in that column is empty. ... empty cell and where the average is based on the n cells above untill ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Need Help With A Loop To Copy
    ... >> I'm just getting started learning Excel VBA and I would ... >> thought a loop structure would be a good way to handle ... >> 8) Stop when an empty cell in Column A is encountered ...
    (microsoft.public.excel.programming)