What I want to happen is when the User types Yes, a red colour is highlighted in the row..
Otherwise a white background in the row.
I am using c sharp language and its a desktop application.
Please help regarding this.
I have also attached a picture .


Isham KhanRank #2,573 · 543 reputationPosted Apr 29, 2015, 9:33 AM EDT
if(e.Column.FieldName=="CustomField1")
{
if (e.CellValue.ToString() == "Yes")
{
e.Appearance.BackColor = Color.Red;
}
else
{
e.Appearance.BackColor = Color.White;
}
}
Khargesh RajputRank #616 · 3.9K reputationPosted Apr 29, 2015, 8:18 PM EDT
if (Convert.ToInt32(row.Cells[2].Value) =="YES")
{
row.DefaultCellStyle.BackColor = Color.Red;
}
else
{
row.DefaultCellStyle.BackColor = Color.Green;
}
Manoj Kumar Mandal198 reputationPosted Apr 29, 2015, 9:05 PM EDT
As per my view its better to use javascript
use function
And on your Item Templete TextBox Use
Code