42 lines
No EOL
1.3 KiB
C#
42 lines
No EOL
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using Telerik.Web.UI;
|
|
|
|
namespace safety
|
|
{
|
|
public partial class OverviewEducation : System.Web.UI.Page
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
General.setTitle(Master, "Overzicht opleidingen");
|
|
|
|
}
|
|
|
|
protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
|
|
{
|
|
//Is it a GridDataItem
|
|
if (e.Item is GridDataItem)
|
|
{
|
|
//Get the instance of the right type
|
|
GridDataItem dataBoundItem = e.Item as GridDataItem;
|
|
|
|
//Check the formatting condition
|
|
byte vcolor = 0; Color nc = Color.White, fc = Color.Black;
|
|
if ((((System.Data.DataRowView)e.Item.DataItem).Row["color"] is Byte))
|
|
{
|
|
vcolor = (byte)((System.Data.DataRowView)e.Item.DataItem).Row["color"];
|
|
General.ColorCell(vcolor, ref nc, ref fc);
|
|
dataBoundItem["certid"].BackColor = nc;
|
|
dataBoundItem["certid"].ForeColor = fc;
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |