Click here to Skip to main content
16,023,103 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I am facing an issue while saving the farpoint grid. At the first opening time of page view state of FP grid loads 3 rows as default rows. When I save the grid number of rows are 7.
When I open the page saving once it works fine loads the grid with seven rows.Now when I named changes in the grid data and saves the grid first it goes to loadviewstate it loads viewstate with 3 rows and throws error because this time grid has 7 rows binded to grid as I am saving the grid second time.
Code for more clarity:
Private Sub FpVal_SaveOrLoadSheetState(ByVal sender As Object, ByVal e As FarPoint.Web.Spread.SheetViewStateEventArgs) Handles FpVal.SaveOrLoadSheetState
            Try
                If (e.IsSave) Then
                    Session(e.SheetView.SheetName) = e.SheetView.SaveViewState()
                Else
                    e.SheetView.LoadViewState(Session(e.SheetView.SheetName))
                End If
                e.Handled = True
            Catch ex As Exception
                Dim obj(0) As Object
                obj(0) = ex
                ExceptionFlag.DynamicInvoke(obj)
            End Try

        End Sub

I get: Invalid Row index 3 (must be between -1 and 2)
Posted
Updated 31-May-10 21:14pm
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900