Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error when updating row in Gridview.
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01153205
Message ID:
01153956
Views:
12
>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
>
Which line of code is it erroring out on? Can you post the stack trace here?

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform