VB.NET Datagridview error

Asked

Viewed 51 times

0

inserir a descrição da imagem aqui

Error:

There is no Row at position 0

Someone can solve me or explain what this mistake is?!

  • Mario, I’m not sure that’s it, but debug your program and see if idCliente is a valid value. Also make sure that the Dataset you return in 'Lerempregadosbyid' has a table with the name 'employees''

  • Welcome Mario Rui. Please always prefer to put the error text and its code instead of the image. Take the [Tour] and get to know the community better.

1 answer

0


This error means exactly what is written on it:

There is no line at zero position

To solve it is also simple: Before making the assignment that is in the error line, validate if the line you are accessing has value.

Use: String.Isnullorempty(myString).

  • thanks. I managed to resolve.

  • Good @Mariorui, if the answer helped you mark it on the symbol on the left or you can add your own answer if you think valid.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.