private void UseCustomTemplate1()
{
CalendarMonthView monthView = new CalendarMonthView();
monthView.Dimensions = new Size(3, 4);
monthView.MinScrollCount = 12;
this.gcCalendarGrid1.CalendarView = monthView;
CalendarTemplate template = CalendarTemplate.CreateDefaultTemplate();
template.InsertColumnHeaderRow(0);
template.ColumnHeader[0, 0].DateFormat = CalendarDateFormats.Month;
template.ColumnHeader[0, 0].AutoMergeMode = AutoMergeMode.Horizontal;
template.ColumnHeader[0, 0].CellStyle.Alignment = CalendarGridContentAlignment.MiddleCenter;
template.RowHeaderColumnCount = 1;
template.RowHeader.Columns[0].Width = 30;
template.RowHeader[0, 0].RowSpan = 4;
template.RowHeader[0, 0].DateFormat = CalendarDateFormats.WeekNumber;
template.RowHeader[0, 0].CellStyle.Alignment = CalendarGridContentAlignment.MiddleCenter;
template.Content[1, 0].RowSpan = 2;
template.Content[1, 0].Value = "(Note)";
this.gcCalendarGrid1.Template = template;
this.gcCalendarGrid1.FirstDateInView = new DateTime(DateTime.Today.Year, 1, 1);
}
Private Sub UseCustomTemplate1()
Dim monthView As New CalendarMonthView()
monthView.Dimensions = New Size(3, 4)
monthView.MinScrollCount = 12
Me.gcCalendarGrid1.CalendarView = monthView
Dim template As CalendarTemplate = CalendarTemplate.CreateDefaultTemplate()
template.InsertColumnHeaderRow(0)
template.ColumnHeader(0, 0).DateFormat = CalendarDateFormats.Month
template.ColumnHeader(0, 0).AutoMergeMode = AutoMergeMode.Horizontal
template.ColumnHeader(0, 0).CellStyle.Alignment = CalendarGridContentAlignment.MiddleCenter
template.RowHeaderColumnCount = 1
template.RowHeader.Columns(0).Width = 30
template.RowHeader(0, 0).RowSpan = 4
template.RowHeader(0, 0).DateFormat = CalendarDateFormats.WeekNumber
template.RowHeader(0, 0).CellStyle.Alignment = CalendarGridContentAlignment.MiddleCenter
template.Content(1, 0).RowSpan = 2
template.Content(1, 0).Value = "(Note)"
Me.gcCalendarGrid1.Template = template
Me.gcCalendarGrid1.FirstDateInView = New DateTime(DateTime.Today.Year, 1, 1)
End Sub