0
<asp:GridView ID="GridView2" runat="server" AllowPaging="True" AutoGenerateColumns="False"
DataSourceID="opendiarysource" Font-Size="Small" style="font-size: 8pt; border-top-style: solid; border-right-style: solid; border-left-style: solid; border-bottom-style: solid; color: black;" AllowSorting="True" >
<Columns>
<asp:TemplateField HeaderText="Date Added" SortExpression="added7">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("added7") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<br />
<asp:Label ID="Label1" runat="server" Text='<%# Bind("added7") %>'></asp:Label><br />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="ByWhom" HeaderText="Added By" SortExpression="ByWhom" />
<asp:BoundField DataField="BOOKNO" HeaderText="Book #" SortExpression="BOOKNO" />
<asp:BoundField DataField="ClearedBy" HeaderText="Cleared By" SortExpression="ClearedBy" Visible="False" />
<asp:BoundField DataField="Done7" HeaderText="Date Done" SortExpression="Done7" Visible="False" />
<asp:BoundField DataField="ForWhom" HeaderText="For Whom" SortExpression="ForWhom" />
我希望這最後一個字段顯示爲下方的行而不是列。顯示gridview列作爲行
<asp:TemplateField HeaderText="Note" SortExpression="Text">
<EditItemTemplate>
<asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Text") %>'></asp:TextBox>
</EditItemTemplate
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# Bind("Text") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
我如何使用列表視圖,我使用VB 2005年,但沒有控制。因爲它在我的asp.net – MyHeadHurts 2011-02-04 17:07:53