Hello,
I have an Entity, Company, that has a property exposing a list of child entities, Car.
For a quick run I created an instance of my Entity:
Company company = new Company() { Name = "Ford", City = "Detroit" };
and then initialized the child entity collection and added two children:
company.Car = new System.Data.Objects.DataClasses.EntityCollection<Car>();
company.Car.Add( new Car() { Name = "Mustang" } );
company.Car.Add( new Car() { Name = "Explorer" } );
I manually defined the schema with my first Band with a Key of, "Company", and the child band to a Key of, "Car".
The parent record is visible, but the child is not. How should I be doing this?
Thank you,
Blu
Hi,
There aren't any samples of this that I know of.
I'm afraid I don't know of any plans to create some. I recommend that you Submit a feature request to Infragistics.
Hi Mike, It appears the last mention of entity framework and infragistics was almost 2 years ago. Has there been any samples released regarding the binding of EF4 and infragistics controls, are there any plans to do so?
I'm afraid I know of no samples using the EntityFramework. I'm not really familiar with this framework. But from what you have posted here, it does not appear to be designed for data binding - at least not in a hierarchical situation.
I'm using Linq to Sql and I don't have any problem with binding. I use EntitySet which also implements IList.
Is there a reason you're using Entity Framework? I think the only reason to prefer it and not Linq to Sql is the ability to seperate the data model and the conceptual model.
I'm working with Linq to Sql for a year now and it is much more simple, and I found a way to well integrate that with WCF.
I tried to do the same thing with Entity Framework and I went back to Linq to Sql after a month playing games with it.
From MSDN:
"An EntityCollection<(Of <(TEntity>)>) is a collection of objects of a particular entity type that represents the "many" end of a one-to-many or many-to-many relationship."
I tried to set the data memeber to "Cars", but a binding exceptions was thrown.
Is there a quick example of binding the UltraWinGrid to entities from the EntityFramework, I only see dataset based examples in the, "Dig into Code" section? I can start there and see if the Grid will work for our applications.
Thanks for the reply.