This is a migrated thread and some comments may be shown as answers.

objectView.Current -> IndexOutOfRangeException

3 Answers 31 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Wolfgang
Top achievements
Rank 1
Wolfgang asked on 25 Jun 2014, 06:52 AM
Hi,

i get sometimes an index out of range exceptino if i try to get the current item of an objectscope (e.g. objectscope has 6 items).

The error is translated "Index -1 has no value"

Can i check the index somehow before accessing Current?

Best regards

 

3 Answers, 1 is accepted

Sort by
0
Ady
Telerik team
answered on 27 Jun 2014, 04:04 PM
Hi Wolfgang,

 Can you provide some sample code that shows the error? There is no property to first check the object at the existing index before calling Current.

Regards,
Ady
Telerik
 
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
 
0
Wolfgang
Top achievements
Rank 1
answered on 03 Jul 2014, 08:26 AM
Hi Ady

The objectview was getting an update. In same moment UI grid was accessing objectView.Current. Additional check for IsBindingSuspended whenever accessing the objectview solved the issue.

Regards,
Wolfgang
0
Accepted
Ady
Telerik team
answered on 04 Jul 2014, 10:01 AM
Hi Wolfgang,

 I'm glad that the problem was resolved. Thank you for the providing information on the fix.
Do get back in case you need further assistance.

Regards,
Ady
Telerik
 
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
 
Tags
Data Access Free Edition
Asked by
Wolfgang
Top achievements
Rank 1
Answers by
Ady
Telerik team
Wolfgang
Top achievements
Rank 1
Share this question
or