Greetings,
In my radgrid i have a column displaying "En cours" or " Nouveau" .
This is the column in question:
I need the text "En cours" to be displayed in green
This is my try which unfortunately does not work:
Thanks in advance for your help
In my radgrid i have a column displaying "En cours" or " Nouveau" .
This is the column in question:
<telerik:GridBoundColumn DataField=
"EtatIncident.nomEtatIncident"
HeaderText=
"Etat du ticket"
SortExpression=
"Etatduticket"
UniqueName=
"EtatDuTicket"
>
</telerik:GridBoundColumn>
I need the text "En cours" to be displayed in green
This is my try which unfortunately does not work:
protected
void
RadGrid2_ItemDataBound(
object
sender, GridItemEventArgs e)
{
foreach
(Telerik.Web.UI.GridDataItem dataItem
in
RadGrid2.MasterTableView.Items)
{
Label lbl = (Label)dataItem.FindControl(
"EtatDuTicket"
);
if
(lbl.Text ==
" En cours"
) { lbl.ForeColor = Color.Green; }
}
}
Thanks in advance for your help