Welcome Guest Search | Active Topics | Sign In | Register

Listbox with a DataSourceID within a ComboBox Error Options
Dan Lasante
Posted: Wednesday, February 1, 2012 2:04:16 PM
Rank: Newbie
Groups: Member

Joined: 1/31/2012
Posts: 8
I have a listbox with a DataSourceID pointing to an AccessDataSource. When the listbox is placed on it's own, the listbox populates perfectly. When I move this listbox in the DropDownTemplate of my ComboBox, I received the following error:

The DataSourceID of 'lstFMHs' must be the ID of a data source control. A control with ID 'IRMSFMH' could not be found.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[HttpException (0x80004005): The DataSourceID of 'lstFMHs' must be the ID of a data source control. A control with ID 'IRMSFMH' could not be found.]
EO.Web.DataBoundControl.a1() +202
EO.Web.DataBoundControl.a3() +79
EO.Web.ListBox.b(Boolean A_0) +234
EO.Web.ListBox.m() +44
EO.Web.DataBoundControl.OnDataBinding(EventArgs e) +105
EO.Web.ListBox.b(EventArgs A_0) +91
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +92
System.Web.UI.Control.DataBind() +15
EO.Web.DataBoundControl.a2() +152
EO.Web.ListBox.a(EventArgs A_0) +200
System.Web.UI.Control.PreRenderRecursiveInternal() +80
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842





Thank you.
eo_support
Posted: Wednesday, February 1, 2012 2:36:46 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Have you tried to place the data source control inside the DropDownTemplate? Currently the data source identified by DataSourceID must appear inside the same INamingContainer. Since DropDownTemplate has its own INamingContainer, controls inside the template and controls outside of the template have different INamingContainer, thus controls inside the template cannot find data source outside of the template.

Thanks!
Dan Lasante
Posted: Wednesday, February 1, 2012 4:25:31 PM
Rank: Newbie
Groups: Member

Joined: 1/31/2012
Posts: 8
Hello,

That worked perfectly. Thank you for the very fast support.

Thank you very mcuh!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.