DropDownList problems

G

Guest

I want to use the selected value of a drop down list to filter a data source.
When i have done this before i have used a DataSourceControl and i have just
made the drop down a control parameter, which works well. However this time
i need to combine a set of results from two databases into a single data
source so i need to use ADO to do it. The problem i come up against is that
until the value in the drop ,down box is changed, the SelectedValue property
does not seem to exist (or is set to null). I have tried setting the
SelectedIndex to a default value, and this work in so far as that index is
selected in the drop down list on the screen, however the SelectedValue
property is still null.

How do i get the vlue that is selected by default in a drop down list,
before anyone selects a different value. This just works with DataSource
controls and control parameters but you can't seem to add a controlparameter
to a ADO DataCommands Parameters collection.
 
J

Jan Hyde

clickon <[email protected]>'s wild thoughts
were released on Tue, 18 Jul 2006 04:20:02 -0700 bearing the
following fruit:
I want to use the selected value of a drop down list to filter a data source.
When i have done this before i have used a DataSourceControl and i have just
made the drop down a control parameter, which works well. However this time
i need to combine a set of results from two databases into a single data
source so i need to use ADO to do it. The problem i come up against is that
until the value in the drop ,down box is changed, the SelectedValue property
does not seem to exist (or is set to null). I have tried setting the
SelectedIndex to a default value, and this work in so far as that index is
selected in the drop down list on the screen, however the SelectedValue
property is still null.

That's odd because that's exactly what I do, and the
selectedvalue *does* contain the correct value, perhaps you
could post some code?

J
How do i get the vlue that is selected by default in a drop down list,
before anyone selects a different value. This just works with DataSource
controls and control parameters but you can't seem to add a controlparameter
to a ADO DataCommands Parameters collection.



Jan Hyde (VB MVP)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,158
Latest member
Vinay_Kumar Nevatia
Top