日期:2014-05-16  浏览次数:20743 次

.NET asp网页GridView问题



我的意思是怎么能直接显示出数据来.

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" AllowPaging="True" BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2" Width="95%" PageSize="12">
             
              <Columns>
                <asp:BoundField DataField="BrandID" HeaderText="品牌" SortExpression="BrandID" />
                <asp:BoundField DataField="Technology" HeaderText="技术" SortExpression="Technology" />
                <asp:BoundField DataField="Price" HeaderText="价格" SortExpression="Price" />
                <asp:BoundField DataField="Model" HeaderText="型号" SortExpression="Model" />
                <asp:BoundField DataField="Zoom" HeaderText="焦距" SortExpression="Zoom" />
                <asp:BoundField DataField="Contrast" HeaderText="对比度" SortExpression="Contrast" />
                <asp:BoundField DataField="Tmarket" HeaderText="上市时间" SortExpression="Tmarket" />
                <asp:BoundField DataField="ProjectorType" HeaderText="配件类型" SortExpression="ProjectorType" />
                <asp:BoundField DataField="Brightness" HeaderText="亮度" SortExpression="Brightness" />
                <asp:BoundField DataField="Screen" HeaderText="屏幕比例" SortExpression="Screen" />
            </Columns>
            <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
            <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
            <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
            <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
            <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#FFF1D4"  />