Note it is windows application.
Database Design as follows (Table name Declaredholidays);
Holiday Reason
2/21/2013 Leave
2/25/2013 Holiday
5/3/2013 Not Available
I have month calendar in my project.
Design as follows;
calendar (Month calendar control)
when i select the month that month all date is display into the datagridview.
In the datagridview that month any date is match with Declaredholidays table that date should be shown in different color.
In datagridview as follows;
Select Month(selected month in month calendar)
Checkbox 2/1/2013
to
28/1/2013
In the declared holidays table 2/21/2013 and 2/25/2013 is there, the above two dates should be shown in different color in datagridview
for that code as follows;
private void Faculty_Available_Calendar_DateChanged(object sender, DateRangeEventArgs e)
{
sql = "select Reason from Tb_Declared_Holidays where Holiday = '" + Faculty_Available_Calendar.selectionstart + "'";
oledbdr = GFun.ReadAcessSql(sql);
while (oledbdr.Read())
{
DGVCalendar.Rows[row].Cells[1].Style.BackColor = Color.Orange;
}
}
when i run in datagrdiview, for the 2/21/2013 and 2/25/2013 above two dates is not shown in differnt color.
what is the problem in my code.
please help me.
Regards,
Narasiman