Need help understanding databinding
I am binding a dataSet to a GridView in C#:
GrivView1.DataSource = ds.Tables[0];
GridView1.DataBind();
aspx:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False">
</asp:GridView>
I have books on ASP.NET 2.0 and books on C# and books on ADO and SQL. What I canât figure out is how to combine custom code with GridView. How do I set all the ASP properties for this GridView, so that I can control the formatting for the columns?
Through ASP, the syntax is:
<asp:BoundField DataField="FieldID" HeaderText="FieldID" ReadOnly="True" SortExpression="FieldID" />
But, when Iâm handing the binding in C# instead, I donât understand how to access all the ASP properties.
How, for example, would I change the header text on the third column?
Thanks for any help with this question.
|