Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to nest 2nd datalist instead of gridview

Thread Tools

How to nest 2nd datalist instead of gridview
Posts: n/a
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 =
End Sub

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

What can be wrong?



Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Nest gridview RowCommand NH ASP .Net 0 11-19-2007 05:32 PM
Nest Gridview Visability Chris ASP .Net 4 04-01-2007 01:36 PM
GridView nested in DataList - refreshing corresponding DataList row after updating GridView row H5N1 ASP .Net 0 04-26-2006 11:41 PM
Nest DataList in DataGrid smay ASP .Net Datagrid Control 0 10-28-2004 06:01 PM
Setting up a datalist control - Item_DataBound for a datalist in a datalist Nevyn Twyll ASP .Net 8 09-09-2004 10:13 PM