Gridview和滚动条 [英] Gridview and Scrollbar

查看:195
本文介绍了Gridview和滚动条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Team



我有一个网页,其中有gridview,当我点击编辑按钮时它有5列和大约50行(每个单元格都有下拉列表)在第20行(所以基本上我需要使用滚动条向下滚动到达第20行,问题是我点击编辑(第20行)页面刷新并回到第一行所以我需要再次向下滚动进行任何更改如何避免这种情况

Hi Team

I have a webpage where gridview is placed and it has 5 columns and about 50 Rows (Each cell has dropdown) when ever I click edit button on 20th row ( so basically i need to scroll down using the scroll bar to reach the 20th row, the problem is the moment i click on edit (20th row) page refreshes and goes back to the first row so i need to scroll down again to make any changes how can this be avoided

推荐答案

在你的page_Load事件中添加以下代码,



Page.MaintainScrollPositionOnPostBack = true;
In your page_Load event add the below code,

Page.MaintainScrollPositionOnPostBack = true;


这篇关于Gridview和滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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