Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 27th, 2009, 09:45 AM
Authorized User
 
Join Date: Jun 2008
Location: , , .
Posts: 75
Thanks: 15
Thanked 0 Times in 0 Posts
Default GridView

I was wondering if anyone has ever done something like this before? I have a form with text boxes for the user to enter data for the fields that they want to search a database for records. Once the query returns records it populates a gridvie control with the records found. However, what I would like to do in addition to just returning the records to the gridview control I also want to populate the textboxes on the form with the first record found and have the first row of the gridview selected. Then if the user scrolls down on the gridview to the second record I would again like to populate the textboxes with the second record in the gridviiews data. Is this possible?
Thanks In Advance
 
Old March 27th, 2009, 10:16 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Hello. Yes this is posible. It will make a round trip every time the user change the row (very very slow!) but you can use ajax to avoid refreshing all the page so you can just refresh the textboxes...
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
 
Old March 27th, 2009, 10:22 AM
Authorized User
 
Join Date: Jun 2008
Location: , , .
Posts: 75
Thanks: 15
Thanked 0 Times in 0 Posts
Default

Could you give me something to get started?
 
Old March 27th, 2009, 10:37 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Like.. code? I will have to write it from scratch just like you ;). I don't have any here.
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
 
Old March 27th, 2009, 10:40 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hampshire, United Kingdom.
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post
Default

I'd recommend trying out some code for yourself then perhaps coming to the forum with the actual issues we have and then we can work to resolve them..

Problems like this can be quite time consuming for contributors to cobble together an answer (and likely not get it right first time) - so it's best to keep the iterations small :)
__________________
Rob
http://cantgrokwontgrok.blogspot.com
 
Old March 27th, 2009, 10:56 AM
Authorized User
 
Join Date: Jun 2008
Location: , , .
Posts: 75
Thanks: 15
Thanked 0 Times in 0 Posts
Default Gridview

Are you telling me this has never been done before????????????????
Why reinvent the wheel. I try to only code things that have a specific functionality not something this general. I guess I will.
 
Old March 27th, 2009, 11:03 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hampshire, United Kingdom.
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post
Default

Maybe, maybe not, I have no idea..

However, I'm all for not reinventing the wheel, but I think its important for our profession to at least try and build their own wheel so they understand what it is, how it works, and why it is important..

This is a forum, not a code repository ;)
__________________
Rob
http://cantgrokwontgrok.blogspot.com
 
Old March 27th, 2009, 11:40 AM
Authorized User
 
Join Date: Jun 2008
Location: , , .
Posts: 75
Thanks: 15
Thanked 0 Times in 0 Posts
Default

OK when I build my wheel I want share it with anyone nor will I give them some direction as to what all building my wheel entailed. I will just tell them yes you can do it. All I was asking is for maybe an article some things to think about before I dive into writing the code. And nothing in my post implied that I am looking for a code repository. Man I think your pathetic and dont comment on anymore of my posts please.
 
Old March 27th, 2009, 11:48 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hampshire, United Kingdom.
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post
Default

Well, you obviously have had a long week, I'm sorry to see that.

I apologise for not communicating clearly, I was merely trying to say:

- Start somewhere
- See where it goes wrong/what challenges you have
- Ask us for help with those
- Rinse and repeat

You're suggesting that I/we are trying to be unhelpful - we're simply saying that we don't have any such code, we know of none, so it may be best to just start and then see where it takes you.

I would say that would be much more useful to your cause rather than your last post :\

I would say you would prob want to get started with some Javascript stuff.. Think it would be better to push as much to the client as possible.. Looking at what you want to do, making it server-side would cause a LOT of chit-chat on the wire..

It may take some work (and debugging) but should be quite possible by hooking in to the DOM events and Javascript.. Are you expecting any of your user base to have javascript disabled?
__________________
Rob
http://cantgrokwontgrok.blogspot.com
 
Old March 27th, 2009, 12:32 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Wow, wow, wow, dotNetDeveloper: let's keep things friendly, shall we?

You've been asking vague questions before and some of us have asked you to be clearer with your questions. Don't go mad when people don't understand what you're asking, especially not if you are giving the impression you don't want to do the work yourself but rather copy and past from somebody else.

With this attitude you'll find that you quickly won't get any replies at all. When that happens, don't blame us for not being friendly, but blame yourself. Also, consider posting a follow up when somebody takes the time to help you. I quickly browsed over your last posts and on almost none of the replies you posted back. A quick "thanks, it's working" or a "I don't understand how this helps me" or "that got me in the right direction" is always appreciated. Yours is not the best attitude to have when you *ask other people to help you*. I, for one, almost have had it with you.

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!




Similar Threads
Thread Thread Starter Forum Replies Last Post
Get GridView Cell Value Based on GridView Column stublair C# 2008 aka C# 3.0 0 September 4th, 2008 08:30 AM
Gridview Thinlizzy ASP.NET 2.0 Basics 2 July 20th, 2007 08:33 AM
GridView heba ASP.NET 2.0 Professional 0 May 28th, 2007 01:59 AM
GridView simonwilbert ASP.NET 2.0 Basics 4 August 12th, 2006 02:40 AM
GridView DARSIN .NET Framework 2.0 2 December 1st, 2004 06:12 AM





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