Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: RE: NOT ANSWERED YET:Setting the EditItemIndex of a Nested Datalist


Message #1 by "Dean Santillan" <webmaster@5...> on Wed, 28 Aug 2002 11:32:52 +0900
Is it possible to answer this question

I am having trouble trying to get the edittemplate
to show of a datalist control that is embedded in a another
datalists ItemTemplate.

Does anyone know how to get this?

public void EditItem(object source,
System.Web.UI.WebControls.DataListCommandEventArgs e)
		{
			DataList NewDL = (DataList)this.DataList1.FindControl("DataList2");

			NewDL.EditItemIndex = e.Item.ItemIndex;
			this.ListNavigation(Int32.Parse(this.DropDownList1.SelectedItem.Value));
		}

I keep getting this error.

Object reference not set to an instance of an object.  which points to this
line
NewDL.EditItemIndex = e.Item.ItemIndex;

Any help or suggestions would greatly appreciated

Thanks
Dean

---

ASP.NET 1.0 Namespace Reference with C#
http://www.wrox.com/acon11.asp?ISBN=1861007442

ASP.NET 1.0 Namespace Reference with VB.NET
http://www.wrox.com/acon11.asp?ISBN=1861007450

These books are a complete reference to the ASP.NET namespaces 
for developers who are already familiar with using ASP.NET. 
There is no trivial introductory material or useless .NET 
hype and the presentation of the namespaces, in an easy-to use 
alphabetical order ensures a user-friendly reference format.
We provide in-depth coverage of all the major ASP.NET classes, 
giving you those real-world tips that the documentation doesn't 
offer, and demonstrating complex techniques with simple 
examples.  

---


  Return to Index