日期:2014-05-18 浏览次数:20492 次
<table> <tr> <td style="width: 283px; text-align:center; background-color:Gray">工号</td> <td style="width: 283px; text-align:center; background-color:Gray">姓名</td> <td style="width: 283px; text-align:center; background-color:Gray">邮件</td> <td style="width: 283px; background-color:Gray"></td> </tr> </table> </div> <div id="dd" style="overflow-y: scroll; height: 200px" class="fixedHeaderTr"> <asp:GridView ID="GridView1" runat="server" Font-Size="12px" GridLines="Vertical" CellPadding="4" ForeColor="Black" ShowFooter="true" AutoGenerateColumns="False" Height="144px" OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating" OnRowCancelingEdit="GridView1_RowCancelingEdit" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px"> <RowStyle BackColor="#F7F7DE" />
楼主确定百度 google 了 。。我记得好像有相关的信息。。。
------解决方案--------------------
http://www.baidu.com/s?wd=gridview+%B9%CC%B6%A8%B1%ED%CD%B7&rsv_bp=0&rsv_spt=3&rsv_n=2&inputT=22005很多 楼主借鉴下 。。。靠自己最快了。。。
------解决方案--------------------
网上太多了.用几行CSS就行了.
------解决方案--------------------
表头加个宽度固定下看看可以不。
<asp:gridview ID="Gridview1" runat="server">
<Columns>
<asp:BoundField HeaderText="username" DataField="username">
<HeaderStyle Width="283px" />
</asp:BoundField>
<asp:BoundField HeaderText="number" DataField="number">
<HeaderStyle Width="500px" />
</asp:BoundField>
<asp:BoundField HeaderText="address" DataField="address">
<HeaderStyle Width="100px" />
</asp:BoundField>
</Columns>
</asp:gridview>