I would like to change the value of my gridview column to active when the value is 1. I have gridview column like
You could loop all columns to get the correct index or use this LINQ:
String colToFind = "status"; int colIndex = ((GridView)sender).Columns.Cast() .Where((c, index) => c.HeaderText.ToLower().Equals(colToFind)) .Select((c,index)=>index).First();