Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get Next Prior Navigation to refresh a dropdown.

Status
Not open for further replies.

jbailey268

Programmer
May 25, 2005
51
US
I am using 2005 .NET with SQL backend.

I have 2 sqldatasources. 1 is for Employee Master a 2nd for Job Descriptions 65-70 of them ; kept in a small table.
Now the form has a plain auto-generated template of the Employee Table 10 fields ; one of which is Job Desc:
I had the form create a pagination, Next Prior etc.

I have below the Employee list the dropdown which contains the Job Descriptions.

As I navigate Next Prior Last etc., how can I get the dropdown list to show the Current job of the viewed employee. It looks misleading to have the small list of 10 items say this:
First HARRY
Last POTTER
Address 123 MAIN STEET
JOB DESC: Program Manager
<etc>

while the dropdown has a default of "Attendance Officer" showing. It would be cool to have it (dropdown) dynamically change when the page index change event triggers. When I tried to link it to the datalist reference, it always seems to show the last one I moved from not the current one I moved to. Hmm. There's got to be an easier way than the kludgy ways I'm entertaining.

Thanks for your help.!!

 
i don't exactly follow what your attempting, but the asp.net life cycle is probally to blame as to why your method isn't working.

you should update the dropdownlist selected index after the page change event fires. depending on when/how you populate the dropdownlist you may need to rebind the dropdown list and select a new index.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top