473,385 Members | 1,752 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,385 software developers and data experts.

is this possible? adding dropdowns based on a databind to other co

LU
I want to add dropdown boxes based on a databind to a checkboxlist.
I database/databind to a checkboxlist but for each checkbox created I want
to also create a drop down next to it with some predefined values.

so, if my databind creates 5 checkbox items, 5 dropdowns should be created.

Nov 19 '05 #1
4 1200
Why don't you create a datarelation between two seperate datatables in a
dataset, then set a selectionchanged event on the checkboxlist to return a
child table so that when the checkbox is checked it postbacks' returning the
necessary child table and bind the associated child record/table to the
dropdownlist?

"LU" wrote:
I want to add dropdown boxes based on a databind to a checkboxlist.
I database/databind to a checkboxlist but for each checkbox created I want
to also create a drop down next to it with some predefined values.

so, if my databind creates 5 checkbox items, 5 dropdowns should be created.

Nov 19 '05 #2
LU
Can you refer me to a sample or documentation on datarelations. Also, how
would I display the drop downs next to the each check box?

"I am Sam" wrote:
Why don't you create a datarelation between two seperate datatables in a
dataset, then set a selectionchanged event on the checkboxlist to return a
child table so that when the checkbox is checked it postbacks' returning the
necessary child table and bind the associated child record/table to the
dropdownlist?

"LU" wrote:
I want to add dropdown boxes based on a databind to a checkboxlist.
I database/databind to a checkboxlist but for each checkbox created I want
to also create a drop down next to it with some predefined values.

so, if my databind creates 5 checkbox items, 5 dropdowns should be created.

Nov 19 '05 #3
Here is a great article on Databinding and Hierarchical DataRelations:

http://msdn.microsoft.com/asp.net/de...atabinding.asp

Good luck. If you want more information on Parent/Child Datarelations you
can do a google search. There is plenty of information out ther on
DataRelations and Datashaping.

"LU" wrote:
Can you refer me to a sample or documentation on datarelations. Also, how
would I display the drop downs next to the each check box?

"I am Sam" wrote:
Why don't you create a datarelation between two seperate datatables in a
dataset, then set a selectionchanged event on the checkboxlist to return a
child table so that when the checkbox is checked it postbacks' returning the
necessary child table and bind the associated child record/table to the
dropdownlist?

"LU" wrote:
I want to add dropdown boxes based on a databind to a checkboxlist.
I database/databind to a checkboxlist but for each checkbox created I want
to also create a drop down next to it with some predefined values.

so, if my databind creates 5 checkbox items, 5 dropdowns should be created.

Nov 19 '05 #4
LU
Sam,
Thanks for the information. The article describes using checkbox not
checkboxlist. I wanted to use a checkboxlist so I could use a validator for
the whole list. Although they are checkboxes, they are required.

"I am Sam" wrote:
Here is a great article on Databinding and Hierarchical DataRelations:

http://msdn.microsoft.com/asp.net/de...atabinding.asp

Good luck. If you want more information on Parent/Child Datarelations you
can do a google search. There is plenty of information out ther on
DataRelations and Datashaping.

"LU" wrote:
Can you refer me to a sample or documentation on datarelations. Also, how
would I display the drop downs next to the each check box?

"I am Sam" wrote:
Why don't you create a datarelation between two seperate datatables in a
dataset, then set a selectionchanged event on the checkboxlist to return a
child table so that when the checkbox is checked it postbacks' returning the
necessary child table and bind the associated child record/table to the
dropdownlist?

"LU" wrote:

> I want to add dropdown boxes based on a databind to a checkboxlist.
> I database/databind to a checkboxlist but for each checkbox created I want
> to also create a drop down next to it with some predefined values.
>
> so, if my databind creates 5 checkbox items, 5 dropdowns should be created.
>

Nov 19 '05 #5

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

Similar topics

2
by: Clayton Hamilton | last post by:
I have a DataGrid on a webform bound to a Datasource and can successfully use <ItemTemplate> to create edit/update/cancel functionality for user maintenance of data. I use separate logic to delete...
4
by: DotNetJunky | last post by:
I have built a control that runs an on-line help system. Depending on the category you selected via dropdownlist, it goes out and gets the child subcategories, and if there are any, adds a new...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
3
by: Robin Thomas | last post by:
I am fairly new to ASP.NET so I think I am missing something fundamental. Anyway, quite often I am pulling data from a database, but then I need to use that data to produce more data. A simple...
1
by: Andrew | last post by:
Hey all, I am very new to ASP.Net (and .Net in general), but that isn't stopping the boss from wanting to begin new projects in it. This latest project has me kinda stumped and after a couple...
2
by: Shiju Poyilil | last post by:
Hi ! I have a requirement wherein i am binding a datalist which contains a label (Caption for the field) and some literal hidden fields and a dropdown list. When I am binding to the datalist.....
2
by: bingomanatee | last post by:
I have developed what amounts to a fancy shopping cart wizard for a scientific instrument using VB.NET. We are having some disturbing phenomena relating to dropdown controls. On my system and...
10
by: =?Utf-8?B?UiBSZXllcw==?= | last post by:
Hi, Problem: How can I databind (or put) a SqlServer query's row return of 115,000 items into a ComboBox quickly? Not much longer than a matter of seconds, that is... Scenario: I am...
7
by: =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?= | last post by:
I'm adding subheadings to a gridview. Each sub head has a few link buttons. I'm adding the controls in the rowdatabound event code follows: sorry about the length here. I have to be missing...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.