Hello,
I am binding a datagrid to some data and using the AutoColumnGeneration. When using a regular linq query against a dataset, everything works fine :
var queryAll = from actor in actorsAll
select new
{
ActorName = actor.IsPerson ? actor.FirstName + " " + actor.LastName : actor.CompanyName
};
MalatDetailsBudgetGridUC.ItemsSource = queryAll;
But as i want my grid to be binded to an ObservableCollection, i am trying to use the followings:
ActorsCollection collection = new ActorsCollection(actorType);
var queryAll = from actor in collection
select new
{
ActorName = actor.IsPerson ? actor.FirstName + " " + actor.LastName : actor.CompanyName
};
MalatDetailsBudgetGridUC.ItemsSource = queryAll;
When using this, my grid get populated with (tiny thin) rows exactly as it should be, but no columns are generated.
B.T.W - ActorsCollection is an implemented ObservableCollection that adds itself with the Actor entities.
Please Help!!