分页时GridView复选框已检查状态 [英] GridView Checkbox Checked Status while Pagination

查看:76
本文介绍了分页时GridView复选框已检查状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有一个小问题,



GridView 在网格一侧有 CheckBoxes



我点击(标记)一些的CheckBox 。然后转发另一页。

再次回来。选中标记框是否可用?

如果可用,为什么?

Hi,

I have a small question,

GridView having the CheckBoxes in side of grid.

I click (mark) some CheckBoxes. Then forwarded the another page.
Again get back. The check marked box are available or not?
if available, why?

推荐答案

当您移动到任何其他页面,页面Posts Back to Server,因此 Page 的状态丢失。

这就是检查的原因状态 CheckBoxes 丢失。



要解决此问题,您需要将检查状态存储在<$ c中$ C>会话。

参考 - 在分页时维护CheckBox的状态在GridView控件中 [ ^ ]。
When you move to any other Page, the page Posts Back to Server, so the state of Page is lost.
That's why the checked status of CheckBoxes are lost.

To resolve this, you need to store the checked status in Session.
Refer - Maintaining State of CheckBoxes While Paging in a GridView Control[^].


这篇关于分页时GridView复选框已检查状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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