Gridview BoundField标题文本应始终显示 [英] Gridview BoundField header text should display always

查看:81
本文介绍了Gridview BoundField标题文本应始终显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个 gridview ,其中有一些动态数据可扩展
可折叠。我设置了 gridview 高度固定,所以当
我扩展了gridview右侧的任何项目时,scoll bar即将到来
。如果我向下滚动,标题不显示意味着它也在上升。当我向下滚动项目时,我想冻结标题行。意味着我想总是显示Grid
的Header部分。我在gridview的BoundField中指定 HeaderText

I have a gridview with some dynamic data which is Expandable and collapsible. I set the gridview Height fixed so when I expanded any item right side of gridview a scoll bar is coming. If I scroll down, Header is not displaying means It is also going up. I want to freeze the header row when I scroll down the Items. Means I want to display the Header part of the Grid always. I am specifying the HeaderText in BoundField of gridview.

我的第二个问题是我的中有复选框gridview 当我在最后一行时,如果我选择任何
复选框,网格会自动向上滚动。我想在选择
复选框后保持网格状态。所有复选框 autopostback 属性为true。

My second problem is I have check boxes in my gridview when I was in last row if I selected any checkbox the grid is scrolling up automatically. I want to keep the grid as it is after selection of checkbox. All check boxes autopostback property is true.

请帮帮我。

推荐答案

我猜您使用的是gridview周围的div / panel显示滚动条。如果是这种情况,则无法冻结gridview标头。相反,您必须在div和gridview之间为标题创建一个单独的表,并从gridview中删除标题文本

My guess is you are using a div/panel around your gridview to show the scroll bar. if that is case then you cannot freeze the gridview header. Instead you have to create a separate table for header between your div and gridview and remove the header text from your gridview.

这是一个示例

< div>

<div>

< table>您的标题信息< / table>

<table>your header information</table>

< gridview>< / gridview>

<gridview></gridview>

< / div>

</div>

let我知道这有用吗!!

let me know if this helps!!


这篇关于Gridview BoundField标题文本应始终显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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