是否可以让GridView进行分页,并且能够使用Select按钮选择将KeyID传递给QueryString的行项? [英] Is is possable to have GridView to paginate and have the ability to have a Select button that selects the row item passing the KeyID to a QueryString?

查看:60
本文介绍了是否可以让GridView进行分页,并且能够使用Select按钮选择将KeyID传递给QueryString的行项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你能分享一些示例代码,其中你有一个Gridview,它有选择按钮和分页链接(数字),这样当你选择显示记录列表的页码时,如果你选择行按钮,该记录的KeyID使用VB.NET作为代码隐藏页面将
传递给QueryString。



这是我的问题。 我可以填充Gridview,而不会出现VB.NET代码背后的问题。 我还可以在行上创建一个链接按钮,当选中该按钮时,将查询字符串中的KeyID传递给编辑记录模块。 这里没问题。


我也可以将Gridview设置为没有问题的分页。 但当我结合使用e.CommandArgument的两个函数时然后单击下一页,e.CommandArgument将页码传递给QueryString并转发到新页面。


所以问题是如何区分所选行项和分页都使用e.CommendArgument? 我无法在同一个模块中使用分页和行项目选择来为GridView提供一个很好的例子。


希望这样做是因为。 谢谢大家过去给予的大力帮助。


Mike







Michael Adkins

解决方案

如果这是ASP.NET,请使用以下论坛。


https://forums.asp.net/


Can you share some example code where you have a Gridview that has select buttons and also pagination links (numbers) so that when you select the page number that list of records are shown but if you select the row button the KeyID for that record passes in to a QueryString using VB.NET as the code behind page.

Here is my issue.  I can populate the Gridview with no issues from a VB.NET code behind.  I can also create a link button on the row that when selected passes the KeyID in the Query String to an edit record module.  No problems here.

I can also set up Gridview to paginate with no problems.  But when I combine both functions that use e.CommandArgument  and click on the next page, the e.CommandArgument passes the page number to the QueryString and forwards to the new page.

So the issue is how to distinguish between the Row Item Selected and the Pagination that both use the e.CommendArgument?  I am unable to fund a good example of a GridView using both pagination and row item selection in the same module.

Hope this make since.  Thank you all for your great help in the past.

Mike


Michael Adkins

解决方案

If this is ASP.NET use the following forum.

https://forums.asp.net/


这篇关于是否可以让GridView进行分页,并且能够使用Select按钮选择将KeyID传递给QueryString的行项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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