Has anyone used plexityhide's GTP.NET for asp.net 3.5 as im trying to colour the individual cells based on a var that im getting from a linq query as follows
PilotDataContext pilot = new PilotDataContext();
var schedule = from x in pilot.slot_tbl_Schedules select x;
foreach (var s in schedule)
{
if (s.AppointmentType == "Repair")
{
CellLayout cl = gn.GetCell(0).Layout.Clone() as CellLayout;
gn.GetCell(0).Layout = cll;
cl.BackgroundColor = Color.Red;
cl.SelectedColor = Color.Red;
}
else if (s.AppointmentType == "Service")
{
CellLayout cl = gn.GetCell(0).Layout.Clone() as CellLayout;
gn.GetCell(0).Layout = cl;
cl.BackgroundColor = Color.Blue;
}
else if (s.AppointmentType == "TravelTime")
{
CellLayout cl = gn.GetCell(0).Layout.Clone() as CellLayout;
gn.GetCell(0).Layout = cl;
cl.BackgroundColor = Color.Green;
}
else if (s.AppointmentType == "AnnualLeave")
{
CellLayout cl = gn.GetCell(0).Layout.Clone() as CellLayout;
gn.GetCell(0).Layout = cl;
cl.BackgroundColor = Color.Yellow;
}
}
the syntax in the if statement is what they have recommended can anyone help on this
Many Thanks