Showing posts with label dgusers. Show all posts
Showing posts with label dgusers. Show all posts

Saturday, March 31, 2012

There is no row at position 1.

Can anybody give me any idea?

There is no row at position 1.

dgUsers.EditItemIndex = (int)e.Item.ItemIndex;

Line 238:dsUser1.Tables["LOCAL_USERS"].Rows[dgUsers.EditItemIndex].Delete();This usually means that your table is empty. Can you make sure that your function doesn't sometimes return an empty table?

e.g., if you try and get a table full of names starting with 'Z', and you get no results,
trying to access row 1 will fail, as it's completely empty.