1
Vote

Problem loading from RIA source

description

First of all this project is great - but can you solve a small problem.
 
If I populate the grid FilteredItemsSource with the Entities from a LoadOperation it works fine : eg
 
LoadOperation<tblResourceType> myOpp = Context.Load(Context.GetTblResourceTypesQuery(), true);
        myOpp.Completed += (s, ea) =>
        {
            if (myOpp.Entities.Count() != 0)
            {
                jibGrid1.FilteredItemsSource = myOpp.Entities;
                     }
        };
But if instead I use an entitySet e.g.
 
LoadOperation<tblResourceType> myOpp = Context.Load(Context.GetTblResourceTypesQuery(), true);
        myOpp.Completed += (s, ea) =>
        {
            if (myOpp.Entities.Count() != 0)
            {
                jibGrid1.FilteredItemsSource = Context.tblResourceTypes;
            }
        };
 
The code falls over here on the OnFilteredItemsSourceChanged method:
 
fil.FilterType = srcT.GetGenericArguments().First();
 
error is "Sequence contains no elements"
 
Is there anyway to the change the code?

comments