I need to display the colum开发者_运维百科n headers to the left within ASP.NET? Any ideas on how to do that?
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;
You have to set the alignment on each bound field:
<asp:BoundField DataField="Source" HeaderStyle-HorizontalAlign="Left" HeaderText="Source" />
精彩评论