Editing an item in a nested datalist

Posted on 2005-03-02
Medium Priority
Last Modified: 2008-01-09
I have a datalist control with another datalist embedded in the item template. I successfully bind and show all the appropriate records and the 'child' records. The problem occurs when I click an edit button or the cancel button when in the edit item template. When the user clicks the edit button in the child datalist it must change the edititemindex and rebind. If I use the databind command it falls over giving me a 'Object variable with block not set' error. The strange thing is if I take out the databind method and simply set the index it will work the SECOND time I click the edit button. Then when it is in the edit mode and I click the cancel button the exact same thing happens. I take out the databind method and have to click the cancel button twice to get it to reset the child data list.
Question by:nikron2626
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Accepted Solution

aspmaestro earned 2000 total points
ID: 13437308

Author Comment

ID: 13437472
It works, but I don't understand it.

Expert Comment

ID: 13438350
the child datalist or any child control inside the datalist has to be referred to using the findcontrol method.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question