User-1262319794 posted
I am retrieving data from SQL Server to a grid view in ASP.Net. Below is the header of the grid view after I retrieved the data from the database.
Time| Atlanta_1| Atlanta_2| Atlanta_3|
I want to replace the name of the cities with "City" dynamically e.g.
Time| City_1| City_2| City_3|
So basically I want to replace a part of the header with "City" and I want to do it while binding it in a grid view NOT in SQL Server. Below is the code how I am retrieving data from the database to my gridview
SqlConnection con = new SqlConnection("My Connection");
string s = "My Stored Procedure"
con.Open();
SqlDataAdapter da = new SqlDataAdapter(s,con);
DataSet ds = new DataSet();
da.Fill(ds);
gridView1.DataSource = ds;
gridView1.DataBind();
con.Close();