Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / January 2005

Tip: Looking for answers? Try searching our database.

Calendar Control info

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Manoj Paramu Das - 28 Jan 2005 18:01 GMT
Hi,

found this code by Sushila B. Patel, which shows the events for the current
month, but shows nothing if its from another month since it has e.Cell.Text
= "" if .Day.IsOtherMonth =true any idea to implement that part?

   Private Sub Calendar1_DayRender(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar1.DayRender
       'If the month is CurrentMonth
       If Not e.Day.IsOtherMonth Then
           Dim dr As DataRow
           For Each dr In dsCalendar.Tables(0).Rows
               'If UserDate is not Null
               If Not dr("UserDate") Is DBNull.Value Then
                   Dim dtEvent As DateTime = dr("UserDate").ToString
                   'If UserDate =CalendarDate
                   If dtEvent.Equals(e.Day.Date) Then
                       e.Cell.BackColor = Color.PaleVioletRed
                   End If
               End If
           Next
           'If the month is not CurrentMonth then hide the Dates
       Else
           e.Cell.Text = ""
       End If
   End Sub

Thanks in Advance
Mona - 31 Jan 2005 15:26 GMT
Hi Manoj,

Remove the condition where he's checking for .IsOtherMonth
and and make sure that the dataset holds event information
for the previous month and the next month so that the events can be filled in.

HTH

Mona

> Hi,
>
[quoted text clipped - 24 lines]
>
> Thanks in Advance

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.