Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Only you can help => select with gridview

Reply
Thread Tools

Only you can help => select with gridview

 
 
Mr. SweatyFinger
Guest
Posts: n/a
 
      12-25-2006
My gridview is ties to a table of states. These are United States states,
from the greatest land in the world.
The numeric column is an autonumber, hopefully you've heard of that. If not
please google "autonumber" before proceeding.
Here is a small sample, so you can clue into what I am doing:

ID State
__ ____________
1 california
2 new york
3 tennessee
4 idaho
5 kentucky
6 florida

If you are with me so far, great. Now I want to have it so when the guy
clicks on a row, the page changes to a list of cities in the state.
But the real kicker here is that I am not doing it with the ID. Oh, no.. you
see, I am thinking out of the box here, and i expect you to do the same.

I am using the state name as the value that gets passed off to the cities
control.

Now I have one problem. How to accomplish? I hate to make a fool out of the
Microsoft Engineers, but I think I may have come up with an idea that they
can not wrap their heads around. I think they did not anticipate this sort
of thing, because I can find no solution.

I thought i would ask you folks, and if you come up with nothing, I very
well may send this off to Microsoft as a "bug", and hopefully they will name
it after me like a new star in the sky.

OK, so get together in small groups of 5 or 6 people each, and let me know
what you come up with by the end of the day.
I know that some of you are smarter than others, but I'm serious when i say
i want you to try to work together on this.

Together we can accomplish something special.

Now get to it. 'Nuff said.




 
Reply With Quote
 
 
 
 
Ken Fine
Guest
Posts: n/a
 
      12-26-2006
LOL. It isn't clear to me whether you're joking here or not, but in the off
chance that there's an authentic need behind your abundant wit and wisdom, I
will try to help.

Why do you want to use a string value -- the state name -- instead of an
integer primary key?

Scott Michell's "extensive examination of the datagrid[gridview]" will tell
you how to accomplish the master-detail scenario you're envisioning. You can
also look at this newer list of tutorials:

http://www.asp.net/Learn/DataAccess/

Look at the Master/Detail stuff, read it, and understand it before bothering
the busy Microsoft Engineers. The link above will tell you how to make what
you want to make.

-KF


 
Reply With Quote
 
 
 
 
Ken Fine
Guest
Posts: n/a
 
      12-26-2006
This is the specific link you want, Mister SweatyFinger:

http://www.asp.net/learn/dataaccess/....aspx?tabid=63

Have fun,
-KF

"Mr. SweatyFinger" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> My gridview is ties to a table of states. These are United States states,
> from the greatest land in the world.
> The numeric column is an autonumber, hopefully you've heard of that. If
> not please google "autonumber" before proceeding.
> Here is a small sample, so you can clue into what I am doing:
>
> ID State
> __ ____________
> 1 california
> 2 new york
> 3 tennessee
> 4 idaho
> 5 kentucky
> 6 florida
>
> If you are with me so far, great. Now I want to have it so when the guy
> clicks on a row, the page changes to a list of cities in the state.
> But the real kicker here is that I am not doing it with the ID. Oh, no..
> you see, I am thinking out of the box here, and i expect you to do the
> same.
>
> I am using the state name as the value that gets passed off to the cities
> control.
>
> Now I have one problem. How to accomplish? I hate to make a fool out of
> the Microsoft Engineers, but I think I may have come up with an idea that
> they can not wrap their heads around. I think they did not anticipate
> this sort of thing, because I can find no solution.
>
> I thought i would ask you folks, and if you come up with nothing, I very
> well may send this off to Microsoft as a "bug", and hopefully they will
> name it after me like a new star in the sky.
>
> OK, so get together in small groups of 5 or 6 people each, and let me know
> what you come up with by the end of the day.
> I know that some of you are smarter than others, but I'm serious when i
> say i want you to try to work together on this.
>
> Together we can accomplish something special.
>
> Now get to it. 'Nuff said.
>
>
>
>



 
Reply With Quote
 
=?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?=
Guest
Posts: n/a
 
      12-26-2006
On the chance i may be making a fool of myself by responding seriously to
your narrative. I’m guessing it’s the data key you are having an issue with.
Guessing further, the data key in your gridview is the autonumber. You can
have more that one item for a datakey.
on row command:
Me.GridView1.DataKeys(e.CommandArgument).Item(0)), ‘ID
Me.GridView1.DataKeys(e.CommandArgument).Item(1)), ‘state

Other than that I’m not sure what the problem is.
(a citizen of the United States of America, and as you noted: “greatest land
in the world”)

--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes


"Mr. SweatyFinger" wrote:

> My gridview is ties to a table of states. These are United States states,
> from the greatest land in the world.
> The numeric column is an autonumber, hopefully you've heard of that. If not
> please google "autonumber" before proceeding.
> Here is a small sample, so you can clue into what I am doing:
>
> ID State
> __ ____________
> 1 california
> 2 new york
> 3 tennessee
> 4 idaho
> 5 kentucky
> 6 florida
>
> If you are with me so far, great. Now I want to have it so when the guy
> clicks on a row, the page changes to a list of cities in the state.
> But the real kicker here is that I am not doing it with the ID. Oh, no.. you
> see, I am thinking out of the box here, and i expect you to do the same.
>
> I am using the state name as the value that gets passed off to the cities
> control.
>
> Now I have one problem. How to accomplish? I hate to make a fool out of the
> Microsoft Engineers, but I think I may have come up with an idea that they
> can not wrap their heads around. I think they did not anticipate this sort
> of thing, because I can find no solution.
>
> I thought i would ask you folks, and if you come up with nothing, I very
> well may send this off to Microsoft as a "bug", and hopefully they will name
> it after me like a new star in the sky.
>
> OK, so get together in small groups of 5 or 6 people each, and let me know
> what you come up with by the end of the day.
> I know that some of you are smarter than others, but I'm serious when i say
> i want you to try to work together on this.
>
> Together we can accomplish something special.
>
> Now get to it. 'Nuff said.
>
>
>
>
>

 
Reply With Quote
 
Mr. SweatyFinger
Guest
Posts: n/a
 
      12-27-2006
This is terrific. But what the hell does it mean?
What am I supposed to do with
> Me.GridView1.DataKeys(e.CommandArgument).Item(0)), 'ID
> Me.GridView1.DataKeys(e.CommandArgument).Item(1)), 'state


Play it on my IPOD?

Now I need you to stop treating me like a complete idiot, and give me
something I can use.

Back to work for you!


 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the point of having 16 bit colour if a computer monitor can only display 8 bit colour? How do you edit 16 bit colour when you can only see 8 bit? Scotius Digital Photography 6 07-13-2010 03:33 AM
select gridview row without using select button? =?Utf-8?B?RGFiYmxlcg==?= ASP .Net 5 02-27-2009 02:56 AM
Save Child GridView only when parent GridView Saved crpietschmann ASP .Net Web Controls 5 09-07-2006 01:58 PM
Stupid question. Please, only stupid responders. If you're not sureif you're stupid, you probably aren't. =?ISO-8859-1?Q?R=F4g=EAr?= Computer Support 6 07-18-2005 05:11 AM
select of select box will select multiple in another box palmiere Javascript 1 02-09-2004 01:11 PM



Advertisments