Solved

Pass values from gridview button control to another page

Posted on 2014-04-16
3
854 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
  • 2
3 Comments
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 500 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help with preventing selection from a combobox 11 41
Generate Numbers in JQuery file 11 72
run a stored procedure from vb.net 1 32
Data organization issue 7 40
Foolproof security solutions has become one of the key necessities of every e-commerce or Internet banking website. If you too own an online shopping site then its vital for you to equip your web portal with customer security features that can allow…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
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.

730 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