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. General Programming
  3. C#
  4. Interface Ibindinglist : Specified argument was out of the range error

Interface Ibindinglist : Specified argument was out of the range error

Scheduled Pinned Locked Moved C#
helpdatabasequestion
2 Posts 1 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.
  • B Offline
    B Offline
    baranils
    wrote on last edited by
    #1

    Hello I've a puzzle for List; IBindingList and Datagridview guru's I get an unexpected "Specified argument was out of the range" Error Here we are : I have a List of T class I've setted a minimal IBindingList interface So at least : AddNew The List is binded on a DGV The List is EMPTY Path to get the error: 1- Click on the unique and empty first row of the dgv : it trigger an AddNew(no new row in DGV) 2- Edit a cell in that row : it will create an empty new row in the DGV 3- Click on an empty cell in that empty row : it trigger a new AddNew (no new row in DGV) 4- Click on Row 0 again 5- Now if I click back on the second row Row it trigger a third AddNew (no new row in DGV) 6- The click back again on Row 0 : BINGO it crashed ! I cant figure out what really happen ?? But it is clear that at this time the List contains 3 Items and the DGV 2 rows Thanks for any help Error : {"Specified argument was out of the range of valid values.\r\nParameter name: rowIndex"}

    B 1 Reply Last reply
    0
    • B baranils

      Hello I've a puzzle for List; IBindingList and Datagridview guru's I get an unexpected "Specified argument was out of the range" Error Here we are : I have a List of T class I've setted a minimal IBindingList interface So at least : AddNew The List is binded on a DGV The List is EMPTY Path to get the error: 1- Click on the unique and empty first row of the dgv : it trigger an AddNew(no new row in DGV) 2- Edit a cell in that row : it will create an empty new row in the DGV 3- Click on an empty cell in that empty row : it trigger a new AddNew (no new row in DGV) 4- Click on Row 0 again 5- Now if I click back on the second row Row it trigger a third AddNew (no new row in DGV) 6- The click back again on Row 0 : BINGO it crashed ! I cant figure out what really happen ?? But it is clear that at this time the List contains 3 Items and the DGV 2 rows Thanks for any help Error : {"Specified argument was out of the range of valid values.\r\nParameter name: rowIndex"}

      B Offline
      B Offline
      baranils
      wrote on last edited by
      #2

      Hello One more precision It seems that the problem is coming from a wrong on canceledit event handling When I click on a new row on the DGV, it trigger the addnew event but if I leave that row without editing I think it is necessary to remove the new element created ? How can I do that ? Thank you for any help

      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