Exemple #1
0
        protected override void CreateChildControls()
        {
            HtmlGenericControl table = new HtmlGenericControl("table");

            this.Controls.Add(table);

            if (this.ShowDayHeader)
            {
                HtmlGenericControl thead = new HtmlGenericControl("thead");


                DayCalendarRow headerRow = new DayCalendarRow();
                headerRow.DayCalendar = this;
                headerRow.RowType     = DayCalenderRowType.HeaderRow;
                headerRow.ShowHeading = true;

                thead.Controls.Add(headerRow);
                DateTime date = this.StartDate;
                table.Controls.Add(thead);
            }

            HtmlGenericControl tbody = new HtmlGenericControl("tbody");

            table.Controls.Add(tbody);

            foreach (DayCalendarRowSet row in this.RowSets)
            {
                tbody.Controls.Add(row);
            }
        }
Exemple #2
0
 protected override void CreateChildControls()
 {
     for (int i = 0; i < this.Divisions; i++)
     {
         DayCalendarRow row = new DayCalendarRow();
         row.RowType     = DayCalenderRowType.DataRow;
         row.DayCalendar = this.DayCalendar;
         if (i == 0)
         {
             row.HeadingText   = this.Title;
             row.ShowHeading   = true;
             row.HeaderRowspan = this.Divisions;
         }
         else
         {
             row.ShowHeading = false;
         }
         this.Controls.Add(row);
     }
 }