private void Form1_Load(object sender, EventArgs e)
{
InitializeDataSource();
// When data binding, the cells in template should be set DataField property to binding a specific column of data source.
this.gcCalendarGrid.Template = this.CreateDataBindingTamplate();
this.gcCalendarGrid.CalendarView = new CalendarListView();
this.gcCalendarGrid.AutoGenerateCellType = true;
this.gcCalendarGrid.ParseDateField += gcCalendarGrid_ParseDateField;
this.gcCalendarGrid.FormatDateField += gcCalendarGrid_FormatDateField;
this.gcCalendarGrid.DataSource = salesInfoDataSet.Tables["DailyRankList"];
this.gcCalendarGrid.DateField = "Date";//This name is from the DataColumn.Name which exists in DataTable "DailyRankList";
this.gcCalendarGrid.CellFormatting += gcCalendarGrid_CellFormatting;
this.gcCalendarGrid.CellParsing += gcCalendarGrid_CellParsing;
}
Private Sub Form1_Load(sender As Object, e As EventArgs)
InitializeDataSource()
' When data binding, the cells in template should be set DataField property to binding a specific column of data source.
Me.gcCalendarGrid.Template = Me.CreateDataBindingTamplate()
Me.gcCalendarGrid.CalendarView = New CalendarListView()
Me.gcCalendarGrid.AutoGenerateCellType = True
AddHandler Me.gcCalendarGrid.ParseDateField, AddressOf gcCalendarGrid_ParseDateField
AddHandler Me.gcCalendarGrid.FormatDateField, AddressOf gcCalendarGrid_FormatDateField
Me.gcCalendarGrid.DataSource = salesInfoDataSet.Tables("DailyRankList")
Me.gcCalendarGrid.DateField = "Date"
'This name is from the DataColumn.Name which exists in DataTable "DailyRankList";
AddHandler Me.gcCalendarGrid.CellFormatting, AddressOf gcCalendarGrid_CellFormatting
AddHandler Me.gcCalendarGrid.CellParsing, AddressOf gcCalendarGrid_CellParsing
End Sub