在.aspx.cs页面中,如何创建gridview并添加列,添加boundfiled。在这里,我附加.aspx代码来创建gridview,因此它是如何在代码后面创建的?
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False">
<HeaderStyle CssClass="headerstyle" />
<Columns>
<asp:BoundField HeaderText="Id" DataField="ID" />
<asp:BoundField HeaderText="GID" DataField="GID" />
<asp:BoundField HeaderText="Subject" DataField="Subject" />
<asp:BoundField HeaderText="Category" DataField="Category" />
<asp:BoundField HeaderText="Dx" DataField="Dx" />
<asp:BoundField HeaderText="Guidelines" DataField="Guidelines" />
<asp:ImageField DataImageUrlField="FilePath" HeaderText="Image" ItemStyle-Height="25px" ItemStyle-Width="25px" />
</Columns>
</asp:GridView>
答案 0 :(得分:0)
试一试
Runtime.getRuntime().availableProcessors() * 2)