Help with Drop Downs and Grid View

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Feb 2007
Posts: 53
Reputation: edouard89 is an unknown quantity at this point 
Solved Threads: 2
edouard89's Avatar
edouard89 edouard89 is offline Offline
Junior Poster in Training

Help with Drop Downs and Grid View

 
0
  #1
Jul 27th, 2007
Im Using MS Visual Studio 2005 Profesional Edition with C#. I have a page that has two(2) drop down lists. The first drop down contains info that when selected will influence the results in the second drop down list. When the info from the second drop down list is clicked it will then display information in a Grid View.

I am connecting to a MSSQL server to get the options for the drop down lists and GridView.

How would I depending on the selection from the first drop down be able to influence what is displayed in the second drop down? Then how would I display information depending on the second drop down in the grid view?

Any pointers, hints or info about this problem is greatly apreciated.
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 1,580
Reputation: Infarction has a spectacular aura about Infarction has a spectacular aura about Infarction has a spectacular aura about 
Solved Threads: 52
Infarction's Avatar
Infarction Infarction is offline Offline
Battle Programmer

Re: Help with Drop Downs and Grid View

 
0
  #2
Jul 28th, 2007
You'd probably want to do a postback when the first (and second) drop-downs change and update the next field accordingly. If you don't want it to refresh the whole page, you'd likely be looking at some AJAX.
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 53
Reputation: edouard89 is an unknown quantity at this point 
Solved Threads: 2
edouard89's Avatar
edouard89 edouard89 is offline Offline
Junior Poster in Training

Re: Help with Drop Downs and Grid View

 
0
  #3
Jul 28th, 2007
I see I guess I will look into AJAX then. Thanks for the input
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 53
Reputation: edouard89 is an unknown quantity at this point 
Solved Threads: 2
edouard89's Avatar
edouard89 edouard89 is offline Offline
Junior Poster in Training

Re: Help with Drop Downs and Grid View

 
0
  #4
Jul 30th, 2007
Turns out that the second drop down is not dependant on the first.

Instead.

The gridview is dependant on both of the drop downs, either one or the other, is there a way that I could set up the Grid View so depending on either the first drop down or second drop down to display the infromation.

Lets say after there is a selection in the first drop down the Grid View Changes, and then I change something in the second drop down which couses the grid view to change once again but this time according to the second drop down.

I am thinking maybe something is trigered after the selection in one of the drop downs but I dont know how I would start on this as I am farily new to ASP.NET.

Any help on this would be apreciated.
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 1,580
Reputation: Infarction has a spectacular aura about Infarction has a spectacular aura about Infarction has a spectacular aura about 
Solved Threads: 52
Infarction's Avatar
Infarction Infarction is offline Offline
Battle Programmer

Re: Help with Drop Downs and Grid View

 
0
  #5
Jul 31st, 2007
I haven't really thought this through, but you could have handler for each of the drop downs to do a postback updating the grid view as necessary.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC