Building the datasource for DropDownList

C

Corobori

I am looking for a sample showing the following:

I have one form (say frmProducts) where there is a dropdown list
containing products.
My users want to make this dropdown list more usable by applying a
filter.
This should work like this: open up a new window (frmProductsFilter)
containing 2 dropdown list: one containing the product's categories and
a second one containing the product's countries of origin and a button
"Apply". When choosing the appropriate category and country and
clicking the "Apply" button the choosen data must be send back to the
original window and applied to the dropdown list.

How can I do this ?

Jean-Luc
www.corobori.com
 
T

Tampa.NET Koder

I think this can be done with some javascript programming and modal dialog
windows. This kinda stuff is most likely client side so not really an
asp.net issue. However, I'm sure someone here has done something similar to
this and they might offer you some advice. I would continue looking
around, possibly exploring some javascript websites and check back to see if
someone else have answered your question
 
C

Corobori

However, I'm sure someone here has done something similar to
this and they might offer you some advice.

That's the reason why I posting my message, I have been searching
around but couldn't find an answer.
 
E

Eliyahu Goldin

Jean-Luc,

It's unlikely you will find a ready-to-use code. I will try to give you some
directions.

Applying a filter is a server-side task. You can do it either by modifying
your select statement or by applying a filter to your datatable in the
dataset with DataTable.Select method.

Opening a new dialog is a client-side task. You should use
window.showModalDialog javascript call with an url to frmProductsFilter as a
parameter. You should implement a javascript client event handler for the
Apply button. In the handler make an object that will contain your filter
data and pass it back to the parent windows in window.returnValue property.
The parent window will get this object as the result of showModalDialog
call. Then you have to pass the filter data from client to server side. For
this you will need to submit the form with filter data passed in hidden text
inputs.
..
Eliyahu
 

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

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top