944,219 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 2305
  • ASP.NET RSS
Jul 27th, 2007
0

Help with Drop Downs and Grid View

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 2
Junior Poster in Training
edouard89 is offline Offline
53 posts
since Feb 2007
Jul 28th, 2007
0

Re: Help with Drop Downs and Grid View

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.
Reputation Points: 683
Solved Threads: 53
Posting Virtuoso
Infarction is offline Offline
1,580 posts
since May 2006
Jul 28th, 2007
0

Re: Help with Drop Downs and Grid View

I see I guess I will look into AJAX then. Thanks for the input
Reputation Points: 10
Solved Threads: 2
Junior Poster in Training
edouard89 is offline Offline
53 posts
since Feb 2007
Jul 30th, 2007
0

Re: Help with Drop Downs and Grid View

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.
Reputation Points: 10
Solved Threads: 2
Junior Poster in Training
edouard89 is offline Offline
53 posts
since Feb 2007
Jul 31st, 2007
0

Re: Help with Drop Downs and Grid View

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.
Reputation Points: 683
Solved Threads: 53
Posting Virtuoso
Infarction is offline Offline
1,580 posts
since May 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: How to disable tab stop on datagrid headers?
Next Thread in ASP.NET Forum Timeline: ASP.net and IIS





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC