Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
415
Updated service release, setting itemsource = linq results
posted

I updated to the latest service release from version 1007.
The following statement started failing because of "invalid cast":
var myresults = from t in mylist
                             select new MyObject(){a="test"};

MyGrid.ItemSource = myresults;

What needs to change to get this to work again? 

  • 6475
    posted

    Hi,

    We're currently looking into fixing this issue. As a workaround you could cast your query to list:

    var myresults = (from t in mylist
                                 select new MyObject(){a="test"}).ToList();

    MyGrid.ItemSource = myresults;

     

    Thanks for reporting that!