Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 9th, 2006, 06:59 AM
Registered User
 
Join Date: Jan 2006
Location: Skopje, , Fyro Macedonia.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to tbekarov
Default passing variable

Hi there I'm Tome form Macedonia.I'm developing ASP.NET 2.0 app.
    There is page with datagrid and when I click select button it opens popup window whit TextBoxes, I want to fill this TextBoxes with data from the clicked row. The question again: How can I pass a variable holding an index or something of clicked row so i can fill (from dataset) the textboxes in popup window.pls help me thanx in advance.

  #2 (permalink)  
Old January 26th, 2006, 11:47 PM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

In the selectedindexchanged event of the gridview, you can grab the value if the ID you want to pass to the pop up window.

Jim

  #3 (permalink)  
Old February 1st, 2006, 02:59 AM
Registered User
 
Join Date: Jan 2006
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to hawkfb63
Default

This sounds very close to something I want to do. Jim, would you mind going into more detail on how to do this. I am somewhat new to asp, and just started using 2.0 a very short time ago. I have a gridview that binds data and only returns one cell. I want to pass the data from that one cell to a string to be used by another parameterized SQL query. Is this possible? Any help you can give would be great.

  #4 (permalink)  
Old February 1st, 2006, 02:21 PM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

question: why show a grid with only one value? If that is the only value returned and you want to use that data for a qurey, just grab that value and pass it along.

  #5 (permalink)  
Old February 1st, 2006, 02:56 PM
Registered User
 
Join Date: Jan 2006
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to hawkfb63
Default

I would like the value to be displayed so that it is easy for people entering data to cross-check. And the gridview is an easy way to display the data...And I dont know how to pass it along so that it may be used to enter data into another table.

  #6 (permalink)  
Old February 1st, 2006, 03:36 PM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

<somevar> = GridView1.Rows(0).Cells(0).Text

  #7 (permalink)  
Old February 1st, 2006, 03:59 PM
Registered User
 
Join Date: Jan 2006
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to hawkfb63
Default

Thank You Thank You!!!

  #8 (permalink)  
Old February 1st, 2006, 04:16 PM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

glad to help...
Jim

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing a Variable LarryS Beginning PHP 1 August 8th, 2006 07:52 AM
Passing variable to a public variable Hudson40 Access VBA 2 February 25th, 2005 06:23 AM
Passing a variable mrideout BOOK: Beginning ASP.NET 1.0 3 August 6th, 2004 02:57 PM
Passing a variable trekmp ADO.NET 1 March 4th, 2004 01:57 PM
passing variable gumgak Classic ASP Databases 13 June 29th, 2003 09:13 PM



All times are GMT -4. The time now is 08:52 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.