изменить цвет перед специальным словом в ячейке gridview
Я хочу изменить цвет некоторыхособые слова НЕ все слова в ячейке gridview. Вот код:
protected void gvContents_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.Cells[3].Text.Contains("Special"))
{
//set The "Special" word only forecolor to red
}
else if (e.Row.Cells[3].Text == "Perishable")
{
//set The "Perishable" word only forecolor to blue
}
else if (e.Row.Cells[3].Text == "Danger")
{
//set The "Danger" word only forecolor to yellow
}
}
}
и текст ячейки может быть как здесь:Radioactive : Danger
или это:Human Body : Special ,Perishable
, Что я должен делать?