Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Datagrid Update Command

Datagrid Update Command

Scheduled Pinned Locked Moved ASP.NET
csharpcssasp-netdatabase
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mkanchha
    wrote on last edited by
    #1

    Hi I am using ASP.NET1.1 with Back end VB.NET Code. I am trying to used Update command in Datagrid. But i am getting error in this line.. Private Sub DataGrid1_UpdateCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DataGrid1.UpdateCommand Dim eId As String eId = DataGrid1.DataKeys(e.Item.ItemIndex) 'This line End Sub Error: "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index" i want to know there i done Mistke Mkanchha

    S 1 Reply Last reply
    0
    • M Mkanchha

      Hi I am using ASP.NET1.1 with Back end VB.NET Code. I am trying to used Update command in Datagrid. But i am getting error in this line.. Private Sub DataGrid1_UpdateCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DataGrid1.UpdateCommand Dim eId As String eId = DataGrid1.DataKeys(e.Item.ItemIndex) 'This line End Sub Error: "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index" i want to know there i done Mistke Mkanchha

      S Offline
      S Offline
      Sathesh Sakthivel
      wrote on last edited by
      #2

      I think the Datagrid is not returned by the function UpdateCommand. Hence it's throwing the error. Do check whether it returns any DataGrid1_UpdateCommand.

      Regards, Satips.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups