Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error when updating row in Gridview.
Message
From
13/09/2006 03:24:08
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Error when updating row in Gridview.
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01153205
Message ID:
01153205
Views:
65
Hi all, when I try to update a row value in MMGridView, there is an error saying tat
"Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index". The following is my code in RowUpdating event, any advice would be appreciated, thanks.
    Protected Sub loGridView_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles loGridView.RowUpdating
        ' Get the item to be updated
        Me.loGridView.EditIndex = e.RowIndex
        ' Retrieve the previous Order Detail DataSet
        Dim dsClmDetail As DataSet = CType(Session("dsClmDetail"), DataSet)
        ' Save the DataSet (the GridView automatically binds back)
        Me.Save(Me.oBxclaimd, dsClmDetail)
        ' Reset the edited item and rebind the GridView
        Me.loGridView.EditIndex = -1
        Me.BindControl(Me.loGridView)
    End Sub
Next
Reply
Map
View

Click here to load this message in the networking platform