Solved

Pass values from gridview button control to another page

Posted on 2014-04-16
3
838 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
Comment Utility
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
Comment Utility
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
Comment Utility
I figured it out...thanks so much for your help!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

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…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now