Re: how to synchronize multiple drop down lists?
- From: "Ed Dror" <edd@xxxxxxxxxxxxxxxx>
- Date: Fri, 8 Sep 2006 09:57:44 -0700
Walter,
I'm using sqlDataSource
Base on MS Dynamics SL I extracted the Modules (75) and Screens (1300)
Then I create one (Module) to Many (Screens) relationship
Then I create a table ModulesScreens looks like this
ModuleID, ModuleCode, ModuleName, ScreenID, ScreenName, ScreenNumber,
ScreenType
Now in WebDev Express asp.net I created one Drop Down list base on
sqlDatasource Modules tabls
Object Name = ModuleName + enable auto post back
Then I created Drop Down list base on Stored Procedure look like this
Object Name = ScreenNumber
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[usp_SelectScreen]
@ModuleName varchar(50)
AS
SELECT ModuleName, ScreenName, ScreenNumber, ScreenType, ScreenID
FROM ScreensModules WHERE (ModuleName = @ModuleName)
ORDER BY ScreenName
With the WHERE = Control
ControlID = ModuleName (this is the Modules drop down list)
Value = ModuleName.SelectedValue
When you run this page it working for the first open drop down list
I'm picking General Ledger from Modules drop down and the second module show
all the screens
That belong to this module but when I pick another module name the second
drop down did not refresh
It stuck with the first pick from the drop down
Its very very similar to MS KB #289670 with Access database
I hope you will get the picture now and tell me how can I refresh the second
drop down list?
I also created a function that will call the stored procedure with passing
parameter from the Module drop down list
And (function call mySelectScreen)
Protected Sub ScreenName_SelectedIndexChanged(ByVal sender As Object, ByVal
e As System.EventArgs) Handles ScreenName.SelectedIndexChanged
Call mySelectScreen()
End Sub
but with no succsess
Thanks,
Ed
"Walter Wang [MSFT]" <wawang@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:ieEUlUu0GHA.400@xxxxxxxxxxxxxxxxxxxxxxxx
Hi Andrew,
After reading throught your post, I'm not quite clear on some points.
Would
you please help me on these points:
1) Are you using ASP.NET Data Source controls such as ObjectDataSource or
SqlDataSource?
2) Would you please post some code such as how you associate the two
DropDownList? A complete working project is better, though.
If you are using Data Source controls, they can bind some parameter to a
control's property; thus when the control's property is changed on
postback, the Data Source control will automatically get updated data.
Then
you bind your second DropDownList to the Data Source control.
I'm looking forward to your update so that we can continue further
discussion. Thank you.
Sincerely,
Walter Wang (wawang@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
.
- Follow-Ups:
- Re: how to synchronize multiple drop down lists?
- From: Walter Wang [MSFT]
- Re: how to synchronize multiple drop down lists?
- References:
- how to synchronize multiple drop down lists?
- From: Ed Dror
- RE: how to synchronize multiple drop down lists?
- From: Walter Wang [MSFT]
- how to synchronize multiple drop down lists?
- Prev by Date: Best use of RadioButtons
- Next by Date: Re: Grabbing Emails
- Previous by thread: RE: how to synchronize multiple drop down lists?
- Next by thread: Re: how to synchronize multiple drop down lists?
- Index(es):