Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Pass values from gridview button control to another page

Posted on 2014-04-16
3
Medium Priority
?
863 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 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

Developer tools in browsers have been around for a while, yet they are still heavily underused by developers. Developers still fix html or CSS then refresh page to see effect, or they put alert or debugger in JavaScript and then try again and again …
While opting for any web-to-print solution, you need to discuss with your team and some of your end users and know their opinions about your decisions. In this article we list down some questions you need to ask yourself.
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
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…

916 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