I write C# code like this. Then I drag GridView into aspx page. I can't set or edit Header-text and ItemStyle-HorizontalAlign.
SqlConnection connection = new SqlConnection(); connection.ConnectionString = @"myServerAddress"; connection.Open(); SqlCommand command = new SqlCommand(); string pvcode = DropDownList2.SelectedValue;
command.CommandText = "SELECT A, B, C FROM MyTable"; command.Connection = connection;
SqlDataReader reader = command.ExecuteReader(); this.GridView1.DataSource = reader;
this.GridView1.DataBind();
How to do it? It is usual for me to edit GridView if it has boundfield. I can't find it. Thank you in advance.
SqlConnection connection = new SqlConnection(); connection.ConnectionString = @"myServerAddress"; connection.Open(); SqlCommand command = new SqlCommand(); string pvcode = DropDownList2.SelectedValue;
command.CommandText = "SELECT A, B, C FROM MyTable"; command.Connection = connection;
SqlDataReader reader = command.ExecuteReader(); this.GridView1.DataSource = reader;
this.GridView1.DataBind();
How to do it? It is usual for me to edit GridView if it has boundfield. I can't find it. Thank you in advance.