I have to bind datagrid in silverlight.
void proxy_DoWorkCompleted(object sender, ServiceReference1.DoWorkCompletedEventArgs e)
{
try
{
//var v = e.Result as Queryable;
//PagedCollectionView pagesEmployees = new PagedCollectionView(v);
//dpGridPager.Source = pagesEmployees;
dataGrid1.ItemsSource = e.Result;
}
catch (Exception ex)
{
MessageBox.Show(ex.InnerException.ToString());
}
}
Now this e.Result should be IEnumerable to bind datagrid. How Should i Convert this to IEnumerable??
e.Resultcontains the result of theDoWorkoperation; if the return type of the service operation is enumerable, thene.Resultwill also be. So update the service operation to return something which is enumerable, then update the service reference.