Exemple #1
0
        //Creates a title row, using the template if specified
        private TableRow CreateTitleRow(DateTime visibleDate, System.Globalization.Calendar threadCalendar)
        {
            //inside the row for the title, we create a cell and an inner table
            TableRow row = new TableRow();

            TableCell titleCell = new TableCell();

            titleCell.ColumnSpan = 7;
            row.Cells.Add(titleCell);

            if (this.HeaderTemplate != null)
            {
                DataBoundCalendarHeader dataitem = new DataBoundCalendarHeader(visibleDate);
                HeaderTemplate.InstantiateIn(dataitem);
                dataitem.DataBind();
                titleCell.Controls.Add(dataitem);
            }
            else
            {
                titleCell.Controls.Add(CreateStaticTitle(visibleDate, threadCalendar));
            }
            return(row);
        }
        //Creates a title row, using the template if specified
        private TableRow CreateTitleRow(DateTime visibleDate, System.Globalization.Calendar threadCalendar)
        {
            //inside the row for the title, we create a cell and an inner table
            TableRow row = new TableRow();

            TableCell titleCell = new TableCell();
            titleCell.ColumnSpan = 7;
            row.Cells.Add(titleCell);

            if (this.HeaderTemplate != null)
            {
                DataBoundCalendarHeader dataitem = new DataBoundCalendarHeader(visibleDate);
                HeaderTemplate.InstantiateIn(dataitem);
                dataitem.DataBind();
                titleCell.Controls.Add(dataitem);
            }
            else
                titleCell.Controls.Add(CreateStaticTitle(visibleDate, threadCalendar));
            return row;
        }