I have grid view and there is a link button inside it. the only thing that i want to do is to changing selected row background color. I mean as i click on the link button(Edit), the color of that row must be changed.I use this code but it doesn't work for me.I also have ID of my record from my command grid view. Can anybody help me?
int idx = Convert.ToInt32(e.CommandArgument); idx = idx - (GridView3.PageSize * GridView3.PageIndex); int ID = (int)GridView3.DataKeys[idx].Value; // GridView3.SelectedRowStyle[idx].backgroundColor= "White"; Session["ID"] = ID; GridView3.EditRowStyle.BackColor = System.Drawing.Color.LightYellow;