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

How to nest 2nd datalist instead of gridview

I have one datalist containg another datalist in the ItemTemplate. I
used to have a gridview inside the datalist instead but I'm trying to
change that to another datalist but the code for binding the inner
datalist doesn't work:

Protected Sub DataList1_ItemDataBound(ByVal sender As Object, ByVal e
As System.Web.UI.WebControls.DataListItemEventArgs)
Dim s As SqlDataSource = e.Item.FindControl("SqlDataSource2")
s.SelectParameters("AccountGroup").DefaultValue =
e.Item.DataItem("AccountGroup")
End Sub

I receive an error message telling me "Object reference not set to an
instance of an object."

What can be wrong?

Regards,

S

Mar 2 '06 #1
0 1542

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

Similar topics

0
by: s.gregory | last post by:
My page layout is like this: Page >DataList (databound using ObjectDataSource1 contained in page) >>Items >>>UserControl >>>>GridView (databound using another ObjectDataSource2 contained in...
0
by: H5N1 | last post by:
Hi there My problem is that in when I update GridView row, which is nested into DataList control, I want to refresh also DataList in which the GridView is nested, since after update, trigger in...
1
by: H5N1 | last post by:
Hello everybody I'm stuck for a long time with the following problem, so I will be really gratefull if you could help me a bit: I have a GridView nested in DataList (it's located in DataList's...
0
by: ammar_fake | last post by:
Hello there. I need a DataList to render the Gridview by providing one of the DataList values as a query for the underlaying Gridview. This does not work: SelectCommand="select * from...
0
by: HP | last post by:
Hi there I have a datalist control with some bound controls in its Item Template and a gridview bound to one of those fields (residing also in Item Template). I've found out that when I click...
4
by: Chris | last post by:
I have a nested gridview. I want the nested gridview to be invisible by default but to become visible when a button is clicked in its parent. The code below handles this toggling well when the...
7
by: =?Utf-8?B?cGF0cmlja2RyZA==?= | last post by:
Hi all! I have a gridview inside a datagrid (nested) for which (gridview) the rowcommand is not raised in order to delete a row from the grid! I also tried OnRowCommand="method", didn't work...
3
by: Sebastian Paul | last post by:
Hi, I registered a WebControlAdapter for any WebControl, that removes all ID attributes (I actually do not need them). Everything works as expected, but the DataList ignores any styles (ItemStyle,...
1
by: Randy | last post by:
In VS 2005, in the Windows Controls, you have the DataGridView (which has scrollbars). In the WebControls, is the GridView or the DataList synonymous with the DataGridView? Can you have...
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: 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
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
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...

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.