Results 1 to 5 of 5

Thread: How to create Calendar in C#

  1. #1
    Join Date
    May 2008
    Posts
    89

    How to create Calendar in C#

    Hello friends

    I want to create calendar in C#. do u have any information about that then plz let me know...

    Thanks

  2. #2
    Join Date
    Dec 2007
    Posts
    71
    Hey friends it's yours homework ... if you have any difficulty than we will solve. but first you try. We will not do your homework.

  3. #3
    Join Date
    May 2008
    Posts
    89
    Try this

    Code:
    CalendarDay d = ((DayRenderEventArgs)e).Day; 
            TableCell c = ((DayRenderEventArgs)e).Cell;    
        
            if ( !d.IsOtherMonth )    
                c.Controls.Add(new LiteralControl(dr["EventDetails"].ToString()));

  4. #4
    Join Date
    Dec 2007
    Posts
    71
    Hey i told before also don't post any code first he should try. Then we are here to help him.

  5. #5
    Join Date
    May 2008
    Posts
    89
    If have know about that we are going to use the same functionality again and again, it is better to make it a re-usable component. So here, you are going to extend the capabilities of basic C# Calendar control. The basic requirement of data driven applications is that source of information basically is data store. It can be database, XML File, Excel or anything for that matter. Here we are going to limit our scope and going to implement the EventCalendar with ADO.NET DataTable as the source of data. Let us see the ingredients of this calendar control

    1. A class which extends System.Web.UI.WebControls.Calendar

    2. The necessary properties :
    EventSource : DataTable with Event Details,
    EventStartDateColumnName : ColumnName of the Column of the type DateTime in the EventSource, which stores the Start Date associated with Events
    EventEndDateColumnName : ColumnName of the Column of the type DateTime in the EventSource, which stores the End Date associated with Events
    EventHeaderColumnName : ColumnName of the Column of the type String in the EventSource, which stores the Event Header,
    EventDescriptionColumnName: ColumnName of the Column of the type String in the EventSource, which stores the Event Detailed Description,
    ShowDescriptionAsToolTip : Boolean to determine whether to display Event Description as Tool Tip or not.
    EventForeColor: ColumnName of the Column to specify the Fore ( Font ) Color for the event. We can specify any Color Name which belongs to System.Drawing.Color namespace.
    EventBackColor: ColumnName of the Column to specify the Back Color for the event.We can specify any Color Name which belongs to System.Drawing.Color namespace.

    3. EventCalendarDayRender Event : Place where the actual logic to show the events in Calendar is implemented

    This describes the skeleton for your EventCalendar Class. Refer to the EventCalendar.cs class in the attached demo for complete implementation. By extending the control in such way we can keep the basic features provided along with the new features/capabilities that we need to cater to our requirements.

Similar Threads

  1. How to Create Calendar in Excel
    By Sanju Baba in forum Windows Software
    Replies: 3
    Last Post: 07-01-2012, 01:03 PM
  2. Cannot Create Multiple Calendar on iCloud?
    By Jalela in forum Technology & Internet
    Replies: 7
    Last Post: 18-06-2011, 09:24 PM
  3. How to Create an Advent Calendar with JavaScript?
    By MELTRONICS in forum Software Development
    Replies: 5
    Last Post: 05-02-2010, 03:05 AM
  4. Create a calendar always visible on my PC?
    By migons in forum Windows Software
    Replies: 5
    Last Post: 04-02-2010, 10:46 PM
  5. How to create calendar add on visual studio
    By Saaarc in forum Software Development
    Replies: 3
    Last Post: 30-07-2009, 03:10 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,718,727,696.23447 seconds with 17 queries