473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Error : Use custom IListSource as a datasource for BindingSource

Hi, I create custom entity objects, a custom collections for the entity objects and a custom object that acts like a collection of the custom entity collections which I called EntitySet Object. The EntitySet is used to bind the entity collections to windows form bindingsource in design time. After 2 weeks of bloody coding and reading really "Helpfull" msdn docs, thanks to http://www.freeweb.hu/noiseehc/ finally I've managed to create the entityset and bind it to a bindingsource in design time. But Unfortunately, the bindingsource list shows 0 count, while the entitycollection itself shows 1 count. Please kindly help what's wrong with the code.

public TypedEntitySet()
{
entityCollectionsDescriptor = new EntityCollectionTypeDescriptorCollection();
entityCollectionsDescriptor.Add(this, "City", typeof(EntityCity));
entityCollectionsDescriptor.Add(this, "Shipment", typeof(EntityShipment));
}

public System.Collections.IList GetList()
{
return this.entityCollectionsDescriptor;
}

The EntityCollection itself simple a custom object thich inherits from BindingList<T>.

Thanks.
Apr 28 '07 #1
0 1133

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: wackyphill | last post by:
Anyone seen this? Know if its a bug? I'm pretty sure it is. I have a DataGridView control in a tab control who's datasource is a table in a dataset. In certain situations when I add a row to the...
7
by: BS | last post by:
Hello everybody I'm calling a webservice that returns complex data. The goal is to populate a datagrid with it. Using a loop for each record found ( such as For i = 0 To...
11
by: Daniel Billingsley | last post by:
I've got a project I've been working on for a few weeks. I've been using the BindingSource control - I've got four of them on this particular form. This morning I went to view the report in the...
3
by: Dan | last post by:
Hi, I'm learning asp.net 2.0 and i get this error: "Data source is an invalid type. It must be either an IListSource, IEnumerable, or IDataSource" My code: Dim a As GridView Dim...
2
by: Steve | last post by:
Hi- OK, I've got a DataGridView, I've created a BindingSource from one of my Business Entity object (based on generated classes from EntitySpaces) I've left the default column setup so that all...
14
by: Rolf Welskes | last post by:
Hello, I have an ObjectDataSource which has as business-object a simple array of strings. No problem. I have an own (custom) control to which I give the DataSourceId and in the custom-control...
0
by: Spam Catcher | last post by:
Hi all, I have a bindingsource hooked up to a datagrid. When I fill the datasource parameter, do I need to check for InvokeRequired... or does the bindingsource asynchronously handle the fill?...
1
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hi misters, I used the Data Sources window to drop a custom object onto the designer surface. It created a BindingSource and BindingNavigator as a result. When I open the Properties window...
2
by: =?Utf-8?B?UGFvbG8=?= | last post by:
I am trying to populate a Listbox with the results of a query triggered from a selection in a combo box: private void cmbxCategory_SelectedValueChanged(object sender, EventArgs e) { string...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.