i have one calendar(Month Calendar Control)
When i select any month that month all date is displaying in datagridview. it is working fine.
For that code as follows;
private void Faculty_Available_Calendar_DateChanged(object sender, DateRangeEventArgs e)
{
DateTime dt1 = Faculty_Available_Calendar.SelectionStart;
dt1 = new DateTime(dt1.Year, dt1.Month, 1);
DateTime dt2 = dt1.AddMonths(1);
int numDays = (dt2 - dt1).Days;
if (DGVCalendar.RowCount < numDays)
{
DGVCalendar.RowCount = numDays;
}
int row = 0;
while (dt1 < dt2)
{
DGVCalendar.Rows[row].Cells[0].Value = dt1.ToString("dd/MM/yyyy");
dt1 = dt1.AddDays(1);
row++;
}
}
the above code is working fine.
In the datagridview i want First column checkbox and second column Date(selected month date)
Then i add check box column in datagrdiveiw.
Error shows as follows;
Teh datagridview checkboxcell has wrong type.
The following steps to add checkbox in the datgridview.
right cick the datagridview,and select the Edit Column and add the
Datagridview CheckBox Column.
Then checkbox is added in the datagridview in the first column and date is the second column.