merci pour tes conseils ostenhard.
j'ai trouvé la solution pour ceux qui seront interessés voici le code:
Code:
1
2
3
4
5
6
7
8
9
10
11
12 protected void Gridview1_RowDataBound(object sender, GridViewRowEventArgs e) { string A_PRIORITE = Convert.ToString(DataBinder.Eval(e.Row.DataItem, "A_PRIORITE")).ToString(); if ((A_PRIORITE == "Bloquant")) { if (e.Row.RowType == DataControlRowType.DataRow) // test pour savoir sin on est sur une ligne ou le header de la datagrid { DataBinder.Eval(e.Row.DataItem, "A_PRIORITE").ToString().Equals("Bloquant"); e.Row.BackColor = System.Drawing.Color.Red; } }