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

CheckBoxList Event Binding

2
Hi,

I am dynamically binding a check box list, now i want to bind drop downs against each generated check box?

How do I do this during the data bound event of check box list?

Expand|Select|Wrap|Line Numbers
  1. Private Sub chkColumnList_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles chkColumnList.DataBound
  2.  
  3.     Dim cnt2 As Integer = chkColumnList.Items.Count
  4.     Dim tblDynamic = New Table()
  5.  
  6.     For i As Integer = 1 To cnt2
  7.         Dim tc = New TableCell()
  8.         Dim tr = New TableRow()
  9.         Dim ddlOrderby = New DropDownList()
  10.         ddlOrderby.ID = "chkDynamicCheckBox" & i
  11.         For x As Integer = 1 To cnt2
  12.               ddlOrderby.Items.Add(x.ToString)
  13.         Next
  14.         tc.Controls.Add(ddlOrderby)
  15.         tr.Cells.Add(tc)
  16.         tblDynamic.Rows.Add(tr)
  17.     Next
  18.     pnlOrderBy.Controls.Add(tblDynamic)
  19.  
  20. End Sub
Jun 6 '13 #1
2 1634
Frinavale
9,735 Expert Mod 8TB
Could you please explain in more detail the purpose of your CheckBoxList and the purpose of your DropDownList?

Also, what does a Table have to do with either of these controls?

-Frinny
Jun 6 '13 #2
ARM8
2
Hi have used a CheckBoxList which fetches all the columns name from the database. Now I need to place DropDownList beside each them to change their order number.

For example, these DrownDownLists would contain all the column numbers if total number of is 10...it will have 1 to 10 numbers.
Jun 6 '13 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Nikki | last post by:
Hi, I m developing a Windows application in which i want to create a context menu, having variable number of submenus depending on the the list in the file. I m able to create these submenus at...
8
by: Donald Xie | last post by:
Hi, I noticed an interesting effect when working with controls that are dynamically loaded. For instance, on a web form with a PlaceHolder control named ImageHolder, I dynamically add an image...
1
by: Nirmalkumar | last post by:
How to attach an event to dynamically created control in VB.NET I have dynamically created dropdown list in code behind (VB.NET). For this control I want to attach an event for action...
4
by: david | last post by:
I have an array of CheckBoxes which dynamically display in a web form. How to detect and determine which CheckBox' check status changed? For example, Array(i, j) from checked to Unchecked and...
1
by: Paul Smith | last post by:
I have entered some code in the CheckBox CheckChanged event, but it does not seem to be function. I want to run some code when the check box is changed, and code run depending on it's checked or...
2
by: Amelyan | last post by:
I *finally* narrowed down my problem to my custom web control. If I hookup event inside dynamically created custom web control, it doesn't get fired. However, event gets fired for any other...
0
by: Silver Oak | last post by:
I have a DataGrid in which one of the columns is TemplateColumn that was created dynamically using iTemplate. I would like to have multi-row editing capability on the DataGrid. I'm trying to...
0
by: has | last post by:
Hi all, need a little bit of advice on dynamically binding an embedded Python interpreter. First, the code for anyone that wants a look: ...
1
by: QuickBooksDev | last post by:
VB.NET 2005 DataGridView Checkbox - Check Event need to know check status I would like to use the DataGridView Checkbox like a normal checkbox. When someone clicks on it I would expect that I...
0
by: swapnil1987 | last post by:
hello friends i am trying to find solution for this problem if u know something then please tell i am creating web application that runs on black berry. here i need to create selection list...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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.