Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have one radiobuttonlist filed
remarks select option [ok] or [notok]

but i want bgcolor when radiobuttonlist select values [notok]...

when record save with [notok] then display data in gridview with this row backgroung color ="rad"


.please help me!!!!!!
Posted

C#
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        CheckBox cbx = (CheckBox)e.Row.FindControl("checkBoxID");
        if (cbx != null)
        {
            if (cbx.Checked)
            {
                e.Row.BackColor = System.Drawing.Color.Red;
            }
        }
    }


this is an Example of how to change bg color of a gridRow.
 
Share this answer
 
sorry ,i want in DATAGRID not in GRIDVIEW

i have one radiobuttonlist filed
remarks select option [ok] or [notok]

but i want bgcolor when radiobuttonlist select values [notok]...

when record save with [notok] then display data in DATAGRID with this row backgroung color ="rad"


.please help me!!!!!!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900