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
115
add new row error
posted

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

    End Sub

 

 

 

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" 

         IsEnterKeyEditingEnabled="True" 

         IsF2EditingEnabled="True" 

         IsMouseActionEditingEnabled="SingleClick" 

         IsOnCellActiveEditingEnabled="True" />

            </igGrid:XamWebGrid.EditingSettings>

        </igGrid:XamWebGrid>

when I insert new record into the add new row it gives following error
<System.NotSUpportedException:Collection was of a fixed size. at System.Array.Syste.Collection.IList.Add(Object Value)>
I am new to silverlight.
Please help me.

  • 9836
    posted

    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.