C# gridview 显示滚动条

使用DIV控件实现滚动条

<div style="width:1100px; height:300px; overflow:auto;">

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BorderWidth="1px" BorderColor="#3366CC" AlternatingRowStyle-BackColor="AliceBlue" BackColor="White" BorderStyle="None"CellPadding="4"Height="239px"OnSelectedIndexChanged="GridView1_SelectedIndexChanged">

</asp:GridView>

<div>

示例:


<table cellSpacing="0" borderColorDark="#3366CC" cellPadding="0" width="100%" align="center"
				borderColorLight="#ffffff" border="1">
				<TR>
					<TD width="5%">
                        平台:
					</TD>
					<TD>
						<asp:DropDownList ID="DropDownList2" runat="server">
    <asp:ListItem Selected="True" Value="0">晋中</asp:ListItem>
    <asp:ListItem Value="1">忻州</asp:ListItem> 
    </asp:DropDownList> </TD> <TD style="width: 10%">
                        业务名称:
					</TD><TD><asp:DropDownList ID="DropDownList1" runat="server" Width="211px">
    </asp:DropDownList><asp:Button ID="Button1" runat="server"
        Text="查询" OnClick="Button1_Click" /></TD></TR>
        <TR>
        <TD colspan="4">
        <div style="width:1100px; height:300px; overflow:auto;">
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
        BorderWidth="1px" BorderColor="#3366CC"   AlternatingRowStyle-BackColor="AliceBlue" BackColor="White" BorderStyle="None" CellPadding="4" Height="239px" OnSelectedIndexChanged="GridView1_SelectedIndexChanged">
        <Columns>
                <asp:BoundField DataField="业务名称" HeaderText="业务名称" SortExpression="业务名称" >
                    <ItemStyle Wrap="False" />
                    <HeaderStyle Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="时段" HeaderText="时段" SortExpression="时段" >
                    <ItemStyle Wrap="False" />
                    <HeaderStyle Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="员工数" HeaderText="员工数" SortExpression="员工数" >
                    <ItemStyle Wrap="False" />
                    <HeaderStyle Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="拨打量" HeaderText="拨打量" SortExpression="拨打量" >
                    <ItemStyle Wrap="False" />
                    <HeaderStyle Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="接通量" HeaderText="接通量" SortExpression="接通量" >
                    <ItemStyle Wrap="False" />
                    <HeaderStyle Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="虚耗量" HeaderText="虚耗量" SortExpression="虚耗量" >
                    <ItemStyle Wrap="False" />
                    <HeaderStyle Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="系统接通量" HeaderText="系统接通量" SortExpression="系统接通量" >
                    <ItemStyle Wrap="False" />
                    <HeaderStyle Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="员工提交量" HeaderText="员工提交量" SortExpression="员工提交量" >
                    <ItemStyle Wrap="False" />
                    <HeaderStyle Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="点击接通量" HeaderText="点击接通量" SortExpression="点击接通量" >
                    <ItemStyle Wrap="False" />
                    <HeaderStyle Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="成功量" HeaderText="成功量" SortExpression="成功量" >
                    <ItemStyle Wrap="False" />
                    <HeaderStyle Wrap="False" />
                </asp:BoundField>   
                <asp:BoundField DataField="接通率" HeaderText="接通率" SortExpression="接通率" >
                    <ItemStyle Wrap="False" />
                    <HeaderStyle Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="系统接通率" HeaderText="系统接通率" SortExpression="系统接通率" >
                    <ItemStyle Wrap="False" />
                    <HeaderStyle Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="成功率" HeaderText="成功率" SortExpression="成功率" >
                    <ItemStyle Wrap="False" />
                    <HeaderStyle Wrap="False" />
                </asp:BoundField>
              <asp:BoundField DataField="虚耗率" HeaderText="虚耗率" SortExpression="虚耗率" >
                    <ItemStyle Wrap="False" />
                    <HeaderStyle Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="点击拒访率" HeaderText="点击拒访率" SortExpression="点击拒访率" >
                    <ItemStyle Wrap="False" />
                    <HeaderStyle Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="后台拒访率" HeaderText="后台拒访率" SortExpression="后台拒访率" >
                    <ItemStyle Wrap="False" />
                    <HeaderStyle Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="ACD" HeaderText="ACD" SortExpression="ACD" >
                    <ItemStyle Wrap="False" />
                    <HeaderStyle Wrap="False" />
                </asp:BoundField>
                 <asp:BoundField DataField="后台小拨" HeaderText="后台小拨" SortExpression="后台小拨" >
                    <ItemStyle Wrap="False" />
                    <HeaderStyle Wrap="False" />
                </asp:BoundField>
                 <asp:BoundField DataField="员工小拨" HeaderText="员工小拨" SortExpression="员工小拨" >
                    <ItemStyle Wrap="False" />
                    <HeaderStyle Wrap="False" />
                </asp:BoundField>
            </Columns>
        <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
        <RowStyle BackColor="White" ForeColor="#003399" />
        <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
        <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
        <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
        <AlternatingRowStyle BackColor="AliceBlue" />
        </asp:GridView>
        </div>
         </TD>
        </TR>
</table>




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值