MESCIUS CalendarGrid for Windows Forms 4.0J
複数列スタイルのカレンダーを有効にする

リストビュースタイルを有効にするには、GcCalendarGrid.CalendarViewプロパティにCalendarMonthMultiColumnViewオブジェクトを設定します。

Imports GrapeCity.Win.CalendarGrid

Dim template As New CalendarTemplate()
template.RowCount = 1
template.ColumnCount = 3
template.RowHeader.ColumnCount = 0

template.ColumnHeader.Columns(0).Width = 50
template.ColumnHeader.Rows(0).Cells(0).Value = "日付"
template.ColumnHeader.Columns(1).Width = 50
template.ColumnHeader.Rows(0).Cells(1).Value = "曜日"
template.ColumnHeader.Rows(0).Cells(2).Value = "メモ"

template.Content.Rows(0).Cells(0).CellStyle.BackColor = Color.Azure
template.Content.Rows(0).Cells(0).DateFormat = "{MonthDay}"
template.Content.Rows(0).Cells(0).CellStyleName = "defaultStyle"
template.Content.Rows(0).Cells(1).CellStyle.BackColor = Color.Azure
template.Content.Rows(0).Cells(1).DateFormat = "{DayOfWeek}"
template.Content.Rows(0).Cells(1).CellStyleName = "defaultStyle"
GcCalendarGrid1.Template = template

Dim monthMultiColumnView As New CalendarMonthMultiColumnView()
monthMultiColumnView.Orientation = Orientation.Horizontal
monthMultiColumnView.ColumnBreaks = New Integer() { 3, 6, 9, 12, 15, 18, 21, 24, 27, 30 }
GcCalendarGrid1.CalendarView = monthMultiColumnView
using GrapeCity.Win.CalendarGrid;

var template = new CalendarTemplate();
template.RowCount = 1;
template.ColumnCount = 3;
template.RowHeader.ColumnCount = 0;

template.ColumnHeader.Columns[0].Width = 50;
template.ColumnHeader.Rows[0].Cells[0].Value = "日付";
template.ColumnHeader.Columns[1].Width = 50;
template.ColumnHeader.Rows[0].Cells[1].Value = "曜日";
template.ColumnHeader.Rows[0].Cells[2].Value = "メモ";

template.Content.Rows[0].Cells[0].CellStyle.BackColor = Color.Azure;
template.Content.Rows[0].Cells[0].DateFormat = "{MonthDay}";
template.Content.Rows[0].Cells[0].CellStyleName = "defaultStyle";
template.Content.Rows[0].Cells[1].CellStyle.BackColor = Color.Azure;
template.Content.Rows[0].Cells[1].DateFormat = "{DayOfWeek}";
template.Content.Rows[0].Cells[1].CellStyleName = "defaultStyle";
gcCalendarGrid1.Template = template;

var monthMultiColumnView = new CalendarMonthMultiColumnView();
monthMultiColumnView.Orientation = Orientation.Horizontal;
monthMultiColumnView.ColumnBreaks = new int[] { 3, 6, 9, 12, 15, 18, 21, 24, 27, 30 };
gcCalendarGrid1.CalendarView = monthMultiColumnView;
関連トピック

 

 


© MESCIUS inc. All rights reserved.