GridView problem

Joined
Jan 11, 2008
Messages
1
Reaction score
0
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top