Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Pass values from gridview button control to another page

Posted on 2014-04-16
3
Medium Priority
?
862 Views
Last Modified: 2014-04-16
I have a gridview in a page with three button controls in template fields. The gridview shows several different summary totals. For each button, on button click I want to open a 'popup' window that displays a details gridview for that row.  (The values I need to pass to the details gridview are columns 1 and 2. (lockbox and credit date).

Can someone help me with this?  I've seen examples for using a hyperlink button control but I'm using a regular button control.  Also, if I click the button within in a certain row does it make that row the 'selected row'?

Any help would be greatly appreciated.

Thanks.
0
Comment
Question by:imstac73
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 2000 total points
ID: 40004661
Define the column in client side:

Client side:

<asp:TemplateField HeaderText="Popup" ShowHeader="False">
  <ItemTemplate>
    <asp:LinkButton ID="Popup" runat="server" CausesValidation="false" Text="Popup" CommandArgument='<%# eval("YourRowIDColumn") %>' oncommand="btnPopup_Command" />
   </ItemTemplate>
</asp:TemplateField>

Open in new window


Server side:

Protected Sub btnPopup_Command(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.CommandEventArgs)

   Dim myId As Integer = e.CommandArgument

---   Your changes goes here to popup another window using the id

Open in new window

End Sub
0
 

Author Comment

by:imstac73
ID: 40004915
Thanks EaswaranP

So I have two column values that I need to pass to the new window; how do I add the additional one to the 'eval' code?
0
 

Author Comment

by:imstac73
ID: 40004977
I figured it out...thanks so much for your help!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If I have to fix slow responding website my first thoughts are server side optimizations: the database may not be optimized or caching is not enabled, or things like that. We often overlook another major part of our web application: the client. We o…
A publishing tool, a Version Control System, or a Collaboration Platform! These can be some of the defining words for the two very famous web-hosting Git repositories: Bitbucket and Github. Git is widely used amongst the programmers and developers f…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question