473,324 Members | 2,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Building the datasource for DropDownList

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

Nov 19 '05 #1
3 1600
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

"Corobori" <jl****@corobori.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
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

Nov 19 '05 #2
> 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.
Nov 19 '05 #3
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

"Corobori" <jl****@corobori.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
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

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: DesignerX | last post by:
I am being sent an ArrayList of ListItems. I can bind to a dropdownlist control using: oDropDownList.DataSource = oArrayList This works but when the dropdownlist is rendered both the select...
0
by: Julie Barnet | last post by:
I have a datagrid that includes a dropdownlist. I have an edit button which allows me to access the dropdownlist as a label only (I can only get the displayed value). I need to be able to...
2
by: Marc Robitaille | last post by:
Hello, I set the DataSource property of a DropDownList to as DataSet that is filled from a SQLDataAdapter. The AutoPostBack property of that DropDownList is set to True. When the...
0
by: anyeone | last post by:
I'm finding articles all over the place saying how to bind a dropdownlist to an objectdatasource or sqldatasource in .NET 2.0/VS2005 but nothing that says how to get the selected value from another...
0
by: Rabbit | last post by:
Hi, All, I have a FormView, in which the InsertItemTemplate has a dropdownlist that I need to set the datasource as my self created dataset. I have been trying various syntax like following at...
0
by: dawg1998 | last post by:
I am able to populate a DropDownList control within multiple rows of a GridView with the following code: `````````````````````````````````````````````````````` <asp:GridView id="gvGridView"...
3
by: Mark Rae | last post by:
Hi, Is it possible to use a Dictionary<int, stringor even Dictionary<string, stringas the DataSource for a DropDownList directly, i.e. without having to iterate through the the Dictionary's...
0
by: jobs at webdos | last post by:
My challenge is I need to populate a formview's dropdownlist even when my datasource does not find a record to bind with. I'm trying to avoid binding in the codebehind. This code works works...
6
by: AG | last post by:
I have a dropdownlist bound to an objectdatasource. I need to loop through all the items in the datasource to get the values of a column that is not used as the datatextfield or the datavaluefield....
1
by: jkeel | last post by:
I have two ddl's in a formview which is bound to an objectdatasource. Each of the ddl's have there datasource propertys set to a function which returns a dataset. The selected index of each of...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.