473,386 Members | 1,602 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.

Databound inside DataList with another DataList

Hi,

I have a problem here with bounding data inside a datalist.

Currently I am working on a page which I can have a list of items
using a datalist(listA). Inside this datalist(listA) i would like to
bound with another datalist(listB) so I am able to list items in listB
based on the unique value on listA.

here's the code that I kinda have...

' this is the databound for listA
Private Sub listA_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataListItemEventArgs) Handles
listA.ItemDataBound
Dim listB As datalist
listB = e.item.findControl("listB")

' the problem occurs here, I have a column called "ItemNum" in listB
and I want to use this ItemNum and based on this ItemNum I will go to
the database and search for approprivate values for other columns(i.e.
CodeA, CodeB, CodeC).
I was thinking to use ANOTHER listC to do that but it seems like it
goes too deep and doesn't work at all.

listB.DataBind()
Dim lblItemNum As Label
lbItemNum = listB.FindControl("ItemNum")
dataRowsB = dataSetB.Tables("tableB").Select("ItemNum = " &
lbItemNum.Text)

' this comes to an error since it was trying to access the LIST of
itemNum in ListB, how would I do something similar to ItemDataBound as
like in listA? I notice that I am not able to access something like
"Private Sub .... Handles listA.ItemDataBound" for listB. Where can I
do something like this so I can access each item in listB?

End Sub
Hope everyone understands what I meant. Thanks for everyone's help.
Nov 19 '05 #1
0 1246

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

Similar topics

1
by: Phil Townsend | last post by:
I want to add a datalist to a Repeater control. The data for the datalist resides in a cached DataSet that contains two related tables. The data in last child table should be rendered in three...
8
by: bienwell | last post by:
Hi, I have a problem of displaying data bound by a datalist control. In my table, I have a field Start_date which has Short Date data type. I tried to update this field by Current Date. After...
2
by: Fabiano | last post by:
Please, i have a ASPX that contains two usercontrols, TOP.ASCX and CENTER.ASCX. The first one has a dropdown list inside of it and the second one has a Datalist. When user changes the...
10
by: Nathan Sokalski | last post by:
I have a DataList control with an EditTemplate. Three of the controls in this template include a Calendar, a Button with CommandName="update", and a Button with CommandName="cancel". Whenever I...
0
by: Les Caudle | last post by:
I have a menu system composed of a DataList nested inside a DataList. The outer DataList has it's DataSource (composed of a DataSet with two tables linked by a CategoryPagesRelation Relation) set...
7
by: | last post by:
I'm using ASP.NET 2.0, C#, SQL Server 2005, and databound controls like the DataList and the GridView. Right now I'm using SqlDataSource as part of very quick and dirty site; I'm not looking to...
4
by: Derty | last post by:
Any way to limit the length of databound text on a datalist itemtemplate?
1
by: rn5a | last post by:
A ASPX page has a DataList control with a few Labels. This page also has a CheckBox which resides OUTSIDE the DataList. By default, this CheckBox is checked. If the CheckBox is checked, then the...
2
by: mianiro | last post by:
Does a control such as a gridview or datalist still load with data when it is bound to a dataset but the visibility is = False?? I have a datalist and a gridview with datasources set at design...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
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
Oralloy
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,...
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.