Reputation: 395
I need to display the column headers to the left within ASP.NET? Any ideas on how to do that?
Upvotes: 1
Views: 2760
Reputation: 783
You have to set the alignment on each bound field:
<asp:BoundField DataField="Source" HeaderStyle-HorizontalAlign="Left" HeaderText="Source" />
Upvotes: 0
Reputation: 5404
You can use the DetailsView, but it's designed to only show one record (or row) from the datasource in a table like this:
Columname1 Value1
Columname2 Value2
Columname3 Value3
Or do you mean you want to align the headertitles to the left? try this:
Gridview1.HeaderRow.HorizontalAlign=HorizontalAlign.Left;
Upvotes: 2