Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error when updating row in Gridview.
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01153205
Message ID:
01153956
Vues:
14
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform