I have silverlight project using WCF and LINQtoSQL and xamwebgrid. following is the grid filling code:
VB CODE:
Private Sub frmMasterFiles_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded
AddHandler webService.D_IngredientType_ListCompleted, AddressOf webService_D_IngredientType_ListCompleted
webService.D_IngredientType_ListAsync()
End Sub
Private Sub webService_D_IngredientType_ListCompleted(ByVal sender As Object, ByVal e As ServiceReference1.D_IngredientType_ListCompletedEventArgs)
Me.grdList.ItemsSource = e.Result
XAML CODE
<igGrid:XamWebGrid Grid.Row="3"
HorizontalAlignment="Left"
Name="grdList"
VerticalAlignment="Top">
<igGrid:XamWebGrid.AddNewRowSettings>
<igGrid:AddNewRowSettings
AllowAddNewRow="Both"
IsEnterKeyEditingEnabled="True"
IsF2EditingEnabled="True"
IsMouseActionEditingEnabled="SingleClick"
IsOnCellActiveEditingEnabled="True" />
</igGrid:XamWebGrid.AddNewRowSettings>
<igGrid:XamWebGrid.EditingSettings>
<igGrid:EditingSettings
AllowEditing="Row"
</igGrid:XamWebGrid.EditingSettings>
</igGrid:XamWebGrid>
This exception is usually caused by using an IList<> rather a type collection (e.g. List<>) as a return type of your method in the WCF service. If you can't resolve the issue, please paste some snippet on yor webservice class so I can try to duplicate the issue.