Click here to Skip to main content
14,387,381 members
Rate this:
Please Sign up or sign in to vote.
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
Rate this:
Please Sign up or sign in to vote.

Solution 1

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.
   
Rate this:
Please Sign up or sign in to vote.

Solution 2

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!!!!!!
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100