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? RRS feed

  • Question

  • 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.


    Michael Adkins

    Thursday, November 16, 2017 3:41 PM

All replies

  • If this is ASP.NET use the following forum.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Thursday, November 16, 2017 4:13 PM