Flexigrid:选择行以适应刷新
我在项目中使用 Flexigrid,我希望能够在网格刷新后保留选定的行。我在 Flexigrid 讨论板上问了同样的问题,得到了这个答案:
添加点击处理程序,如果选择了行的行 ID,则保存 id。刷新完成后,再次选择该行(如果仍然存在)
不知道如何继续,我什至不知道函数将是什么样子,所以这就是为什么我没有任何代码可以开始。
如果有人能指出我正确的方向,我将不胜感激。
谢谢,
克里斯蒂安。
I am using flexigrid in a project and I would like to be able to keep the selected rows after the grid is refreshing. I asked the same question on the flexigrid discussion board and I got this answer:
Add a click handler, save the id if the row id of the row selected. On refresh completion, select the row again (if still present)
Not sure how to proceed on this, I don't even know how a function will look like, so that's why I don't have any code to start with.
If someone could point me in the right direction will be greatly appreciated.
Thanks,
Cristian.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Flexigrid 向选定的行添加了一个名为 trSelected 的类,因此每当网格上发生单击事件时,您都可以查找所有选定的行并以某种方式保存它们。下面是您可以执行的操作的一个简单示例:
Flexigrid adds a class called
trSelected
to selected rows, so whenever a click event happens on the grid you could just look for all the selected rows and save them in some way. Below is just a quick example of what you could do:我编写了一些小代码来保持分页之间以及刷新期间的多重选择。
I have done small code to keep multi-selection between pagination and also during refresh.