S
Simon
I have a combobox on a form bound to a bindingSource. DataSource is
derived from BindingList as follows:
public class RendererList : BindingList<RendererListItem> {
public RendererList() {
Add(new RendererListItem("Active Server Pages"));
}
}
In my form I am calling the Add method to set the source
rendererListBindingSource.Add(_renList);
_renList is an instance of RendererList which is instantiated at declaration
ie RenderList _renList = new RenderList();
I am getting the error:
InvalidOperationException : Objects added to a BindingSource's list must
all be of the same type.
I've had this error before when I tried to add a collection to the
bindingSource which WASN'T derived from BindingList.
I appreciate this isn't srictly ADO.NET but I seem to find that the best
advice about databinding can be found in this group.
Any ideas.
Many Thanks
Simon
derived from BindingList as follows:
public class RendererList : BindingList<RendererListItem> {
public RendererList() {
Add(new RendererListItem("Active Server Pages"));
}
}
In my form I am calling the Add method to set the source
rendererListBindingSource.Add(_renList);
_renList is an instance of RendererList which is instantiated at declaration
ie RenderList _renList = new RenderList();
I am getting the error:
InvalidOperationException : Objects added to a BindingSource's list must
all be of the same type.
I've had this error before when I tried to add a collection to the
bindingSource which WASN'T derived from BindingList.
I appreciate this isn't srictly ADO.NET but I seem to find that the best
advice about databinding can be found in this group.
Any ideas.
Many Thanks
Simon