How I can change background row in grid view when it updated?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SafaaDalloul
    New Member
    • May 2010
    • 5

    How I can change background row in grid view when it updated?

    I want change the background row when I press on Update LinkButton in side grid view Please say to me what is wrong in this code I do it code but the background changed just in put C# word that means it's static on C# but I want when you do any value and updated it the result will be changed the background color:
    Code:
    if (e.Row.RowType == DataControlRowType.DataRow)
    {
        if ((DataBinder.Eval(e.Row.DataItem, "cat_name")).ToString() == "C#")
       e.Row.BackColor = Color.Aquamarine; 
       // e.Row.Cells[2].BackColor = System.Drawing.Color.Red;
    }
    Last edited by Frinavale; May 17 '10, 02:07 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    You need to keep track of which records have been updated somehow.
    I can think of many ways to do this but think about how you would keep track of which rows/records were updated...try to think of your own solution on how to do this and we can go from there :)

    Comment

    Working...