Re: how to synchronize multiple drop down lists?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Walter,

I did all that and it change but only for the first time
Like when you choose General Ledger module you will see the
Screen name drop down list with the general Ledger screens - ok

Now if you change the Module again like AR the ScreenName dropdown don't
change
It stay with the first time
All I want to change it all the time when you switch modules the screens
names will change too
How to make it like Refresh or Require like ms access without refreshing all
the page or
something when module text change then something happened

Ed,



"Walter Wang [MSFT]" <wawang@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:8loRxXj1GHA.4464@xxxxxxxxxxxxxxxxxxxxxxxx
Hi Ed,

Here're some steps I'm using to test the functionality:
1) Create a table Modules:

create table Modules(ModuleName varchar(50) not null)

2) Create a table ModuleScreens:

create table ModuleScreens(ModuleName varchar(50) not null, ScreenName
varchar(50) not null)

3) Insert some test data:

insert into Modules values('module1')
insert into Modules values('module2')
insert into ModuleScreens values('module1', 'screen1')
insert into ModuleScreens values('module2', 'screen2')

4) Create the stored procedure:

create procedure spGetScreenByModuleName
@ModuleName varchar(50)
as
select ScreenName from ModuleScreens
where ModuleName=@ModuleName

5) In web application, create a new WebForm, add first DropDownList,
configure it to use SqlDataSource to use SQL:

select ModuleName from Modules

and configure its Text and Value both to use the ModuleName field. Also
set its AutoPostBack = true.

6) Add another DropDownList, configure it to use a new SqlDataSource which
is configured to use the stored procedure; configure its parameter to use
control parameter and use first DropDownList's SelectedValue.

7) Run this WebForm, change selection of first DropDownList, you will see
the second DropDownList's values changes accordingly.

I hope this helps. Please feel free to post here if anything is unclear.

Regards,
Walter Wang (wawang@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no
rights.



.