如何用c#语言滚动asp.net中gridview的数据 [英] how to scroll data of gridview in asp.net with c# language

查看:70
本文介绍了如何用c#语言滚动asp.net中gridview的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们,先生,



如何使用c#语言在asp.net中滚动gridview的数据。



i希望在页面中使用滚动显示使用gridview和所有表格数据。



谢谢

hello dear friends and sir,

how to scroll data of gridview in asp.net with c# language.

i want to use gridview and all table data using scrolling show in the page.

thanks

推荐答案

保持你的网格视图在面板内。
keep your grid view inside panel.


Hi...
using panel in gridview like this.its may useful to u.

<pre lang="c#"><asp:Panel ID="panel1" runat="server" Height="161px" Width="519px" ScrollBars="Horizontal">
                <asp:GridView ID="GridView1" runat="server" HeaderStyle-BackColor="Lavender" BorderColor="Red"  HeaderStyle-ForeColor="IndianRed"

                    AlternatingRowStyle-BackColor="DarkSeaGreen"

                    SelectedRowStyle-ForeColor="Blue" Height="37px" Width="768px"

                    AutoGenerateColumns="False">
                    <AlternatingRowStyle BackColor="LightGoldenrodYellow" />
                    <Columns>
                        <asp:BoundField DataField="CML_Number" HeaderText="CML_Number" />
                        <asp:BoundField DataField="Product_Name" HeaderText="Product_Name" />
                     </Columns>
                    &lt;HeaderStyle ForeColor="CornflowerBlue" />
                    &lt;SelectedRowStyle ForeColor="Blue" />
                </asp:GridView></asp:Panel> </pre>



谢谢你。


thank u.


将这个样式与你的网格视图中的div一起使用



style =width:100%;身高:70%;溢出:自动





或使用面板并设置其属性滚动到水平或垂直,你想要
use this style with your div in which you have grid view

style="width: 100%; height: 70%; overflow: auto"


or use panel and set its property Scroll to horizontal or vertical which u want


这篇关于如何用c#语言滚动asp.net中gridview的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆