Hi,
I've got a table like this
Cat1 ¦ Item1
Cat1 ¦ Item2
Cat1 ¦ Item3
Cat2 ¦ ItemA
Cat2 ¦ ItemB
I would now like to create a master and a detail dropdownlist, meaning
the master DDL displays "Cat1; Cat2" and if I select "Cat1" for example
the detail DDl will display "Item1; Item2; Item3".
I tried different ways but nothing really works. Can anyone point me to
a working solution?
Thanks a lot!
Jerome 4 2053
by table, do you mean DataBase table or .NET dataTable
IF its a database,
you can first query the Cat items Grouping by or distinct, to give you the
list like:
Cat1
Cat2
You can then populate the first drop down with that list.
ONce the user picks on of those options, you can then do an additional
DataBase request to get the list of Items filtered by the selected category.
This will take a server postbck though and isn't the best user experience.
You can use Cacheing to speed this up, or javascript
HTH
"Jerome" <su************ *@gmail.com> wrote in message
news:eU******** ******@TK2MSFTN GP10.phx.gbl... Hi,
I've got a table like this
Cat1 ¦ Item1 Cat1 ¦ Item2 Cat1 ¦ Item3 Cat2 ¦ ItemA Cat2 ¦ ItemB
I would now like to create a master and a detail dropdownlist, meaning the master DDL displays "Cat1; Cat2" and if I select "Cat1" for example the detail DDl will display "Item1; Item2; Item3".
I tried different ways but nothing really works. Can anyone point me to a working solution?
Thanks a lot!
Jerome
Hi, thanks for answering.
Yes, I meant a database table.
And populating the first DDL isn't the problem, the second is.
Since the whole list would be way to long for only one DDL, I thought it
would be better to split it in 2. So the user first chooses the category
in the first and then the item in the second. The question now was how
to populate the second DDL based on the first one.
If Postback isn't the best way, what other options do I have and how
would I implement that in my ASP.NET code?
Thanks a lot.
Grant Merwitz wrote: by table, do you mean DataBase table or .NET dataTable
IF its a database, you can first query the Cat items Grouping by or distinct, to give you the list like: Cat1 Cat2
You can then populate the first drop down with that list. ONce the user picks on of those options, you can then do an additional DataBase request to get the list of Items filtered by the selected category.
This will take a server postbck though and isn't the best user experience. You can use Cacheing to speed this up, or javascript
HTH
"Jerome" <su************ *@gmail.com> wrote in message news:eU******** ******@TK2MSFTN GP10.phx.gbl...
Hi,
I've got a table like this
Cat1 ¦ Item1 Cat1 ¦ Item2 Cat1 ¦ Item3 Cat2 ¦ ItemA Cat2 ¦ ItemB
I would now like to create a master and a detail dropdownlist, meaning the master DDL displays "Cat1; Cat2" and if I select "Cat1" for example the detail DDl will display "Item1; Item2; Item3".
I tried different ways but nothing really works. Can anyone point me to a working solution?
Thanks a lot!
Jerome
The easiest most straight forward way would be to do an additional call
causing a post back.
Where for every call you'de be repopulating the same dropdowns contents with
a filetered list based on the first list.
This could be done with the SelectedIndexCh anged option on the first
dropdownlist, that will call a method that reads its selected value,
retrieves a filtered list from your DB based on that value, and then binds
this list to the second DropDown.
To avoid doing a post back, you'll either have to user XmlHttp (xml over
http), to bind the list client side, or initially build javascript from your
given dataset to filter the list client side.
This is quite a bit more complex, and although a better user experience, the
first method is much easier to implement and more importantly works
"Jerome" <su************ *@gmail.com> wrote in message
news:OW******** *****@TK2MSFTNG P10.phx.gbl... Hi, thanks for answering.
Yes, I meant a database table. And populating the first DDL isn't the problem, the second is.
Since the whole list would be way to long for only one DDL, I thought it would be better to split it in 2. So the user first chooses the category in the first and then the item in the second. The question now was how to populate the second DDL based on the first one.
If Postback isn't the best way, what other options do I have and how would I implement that in my ASP.NET code?
Thanks a lot.
Grant Merwitz wrote: by table, do you mean DataBase table or .NET dataTable
IF its a database, you can first query the Cat items Grouping by or distinct, to give you the list like: Cat1 Cat2
You can then populate the first drop down with that list. ONce the user picks on of those options, you can then do an additional DataBase request to get the list of Items filtered by the selected category.
This will take a server postbck though and isn't the best user experience. You can use Cacheing to speed this up, or javascript
HTH
"Jerome" <su************ *@gmail.com> wrote in message news:eU******** ******@TK2MSFTN GP10.phx.gbl...
Hi,
I've got a table like this
Cat1 ¦ Item1 Cat1 ¦ Item2 Cat1 ¦ Item3 Cat2 ¦ ItemA Cat2 ¦ ItemB
I would now like to create a master and a detail dropdownlist, meaning the master DDL displays "Cat1; Cat2" and if I select "Cat1" for example the detail DDl will display "Item1; Item2; Item3".
I tried different ways but nothing really works. Can anyone point me to a working solution?
Thanks a lot!
Jerome
search: dependent listbox
<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee. com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
"Grant Merwitz" <gr***@workshar e.com> wrote in message
news:uO******** ******@tk2msftn gp13.phx.gbl... The easiest most straight forward way would be to do an additional call causing a post back. Where for every call you'de be repopulating the same dropdowns contents with a filetered list based on the first list.
This could be done with the SelectedIndexCh anged option on the first dropdownlist, that will call a method that reads its selected value, retrieves a filtered list from your DB based on that value, and then binds this list to the second DropDown.
To avoid doing a post back, you'll either have to user XmlHttp (xml over http), to bind the list client side, or initially build javascript from your given dataset to filter the list client side. This is quite a bit more complex, and although a better user experience, the first method is much easier to implement and more importantly works
"Jerome" <su************ *@gmail.com> wrote in message news:OW******** *****@TK2MSFTNG P10.phx.gbl... Hi, thanks for answering.
Yes, I meant a database table. And populating the first DDL isn't the problem, the second is.
Since the whole list would be way to long for only one DDL, I thought it would be better to split it in 2. So the user first chooses the category in the first and then the item in the second. The question now was how to populate the second DDL based on the first one.
If Postback isn't the best way, what other options do I have and how would I implement that in my ASP.NET code?
Thanks a lot.
Grant Merwitz wrote: by table, do you mean DataBase table or .NET dataTable
IF its a database, you can first query the Cat items Grouping by or distinct, to give you the list like: Cat1 Cat2
You can then populate the first drop down with that list. ONce the user picks on of those options, you can then do an additional DataBase request to get the list of Items filtered by the selected category.
This will take a server postbck though and isn't the best user experience. You can use Cacheing to speed this up, or javascript
HTH
"Jerome" <su************ *@gmail.com> wrote in message news:eU******** ******@TK2MSFTN GP10.phx.gbl...
Hi,
I've got a table like this
Cat1 ¦ Item1 Cat1 ¦ Item2 Cat1 ¦ Item3 Cat2 ¦ ItemA Cat2 ¦ ItemB
I would now like to create a master and a detail dropdownlist, meaning the master DDL displays "Cat1; Cat2" and if I select "Cat1" for example the detail DDl will display "Item1; Item2; Item3".
I tried different ways but nothing really works. Can anyone point me to a working solution?
Thanks a lot!
Jerome
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Dmitri Shvetsov |
last post by:
Hi,
Did somebody play with SelectionList Control - Mobile Web Forms ?
I found a problem with this control if it runs in a DropDown list mode.
First of all the Selected item sometime is 0, sometimes is -1 when I skip a
selection moving to a next page. So it returns me a wrong selection when I
don't want to do a selection.
Second problem - SelectedIndexChanged() event doesn't work if this type is
|
by: sagdude |
last post by:
I have a master detail datatable and add a relation
DataRelation relation = new DataRelation("PartNoRelation", Dt_Cart.Columns, Tbl_NearestCenters.Columns,false);
Ds_CartItem.Relations.Add(relation);
when I try to add my detail to a radiobutton list in datalist(the master information are show in data list)I use this code
but it shows all the data in detail table not just the related one
private void DataList1_ItemDataBound(object sender,...
|
by: hlam |
last post by:
Help - Calculating the total of a column in a data grid --
when data grid is part of Master-Detail set-up
I have setup a Master-Detail form using Visual
Studio.Net. A ListBox is the (Master) and contains a list
of dates. The data grid (Details portion) contains the
details for a selected date (namely, a list of work codes
and hours spent).
I am trying to total the number of hours in the datagrid
|
by: Sam |
last post by:
Attached I am sending 2 URL's from MSFT ASP.net Quick Start
Tutorial Web Site.
1) Run it URL:
http://www.asp.net/QuickStart/aspnet/samples/data/GridViewMasterDetai...
2) View Source URL:
http://www.asp.net/QuickStart/util/srcview.aspx?path=~/aspnet/samples...
|
by: Sam |
last post by:
Sorry to post the same post multiple times but the URL Addresses were
not Correct in Earlier Posts.
Here are the correct URL's:
1) Run It URL is here:
http://www.asp.net/QuickStart/aspnet/samples/data/GridViewMasterDetailsInsertPage_vb.aspx
| |
by: Gary200 |
last post by:
Hello All,
I bind two datagrids in a master-detail relationship successfully.
What I want is to set allowNew and allowDelete disabled in both datagrid
using dataview.
The code like this:
Dim masterGrid As DataGrid
Dim detailGrid As DataGrid
|
by: zeeshansohail |
last post by:
I am developing a Database in ORACLE.
I have Master/Detail relationship between two tables named as BILL (Master Table) and DETAIL_DETAIL (Detail Table).
Master Table BILL contains product information like Bill_Id, ProductCode, ProductName, and BILL_DETAIL table contains Bill_Id, Sr_No, BillAmount, CompanyInfo and Product_Category.
I am developed Forms using DEVELOPER 2000 FORMs 6i,
The problem states that in some Products, Companies...
|
by: BillG |
last post by:
I am developing a business app using asp.net that will have 2 different
types of forms, a list view of data and then a detail view. The list views
are placed on a content panel in a master page. The user can then click an
Add button or edit button to add or modify an item in the list. My question
is what is the best way to handle a detail form? Should the detail form
appear in place of the list view in the content panel of the master...
|
by: Zetten |
last post by:
This is going to be a long one, but hopefully that will make it easier to understand. I know I don't like posts with too little detail when I'm searching for help.
I am creating a form with which a user can make forms. After filling in basic details like Title, Author, Description, the user can add multiple input fields of different types.
This is done in the form of a table, with each row acting for a single input, i.e. input1, input2,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |