PowerTools CalendarGrid for Windows Forms 1.0J
任意の日付のセルにセル型を配置する

CalendarGridでは、カレンダーの任意の日付のセルだけに異なるセル型を配置することができます。

次のコードでは、今日の日付にだけButton型セルを配置します。

Imports GrapeCity.Win.CalendarGrid

Dim today As DateTime = DateTime.Today
Dim buttonCellType As New CalendarButtonCellType()
gcCalendarGrid1.Content(today).Rows(1).Cells(0).CellType = buttonCellType.Clone()
gcCalendarGrid1.Content(today).Rows(1).Cells(0).CellStyle.Alignment = CalendarGridContentAlignment.MiddleCenter
gcCalendarGrid1.Content(today).Rows(1).Cells(0).Value = "OK"
gcCalendarGrid1.ScrollIntoView(today)
using GrapeCity.Win.CalendarGrid;

var today = DateTime.Today;
var buttonCellType = new CalendarButtonCellType();
gcCalendarGrid1.Content[today].Rows[1].Cells[0].CellType = buttonCellType.Clone();
gcCalendarGrid1.Content[today].Rows[1].Cells[0].CellStyle.Alignment = CalendarGridContentAlignment.MiddleCenter;
gcCalendarGrid1.Content[today].Rows[1].Cells[0].Value = "OK";
gcCalendarGrid1.ScrollIntoView(today);

参照

 

 


© 2014 GrapeCity inc. All rights reserved.