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 .

Manoj Kumar MandalPosted Apr 30, 2015, 1:05 AM
As per my view its better to use javascript
use function
And on your Item Templete TextBox Use
Code
Khargesh RajputPosted Apr 30, 2015, 12:18 AM
if (Convert.ToInt32(row.Cells[2].Value) =="YES")
{
row.DefaultCellStyle.BackColor = Color.Red;
}
else
{
row.DefaultCellStyle.BackColor = Color.Green;
}
Isham KhanPosted Apr 29, 2015, 1:33 PM
if(e.Column.FieldName=="CustomField1")
{
if (e.CellValue.ToString() == "Yes")
{
e.Appearance.BackColor = Color.Red;
}
else
{
e.Appearance.BackColor = Color.White;
}
}