objectView.Current -> IndexOutOfRangeException

4 posts, 1 answers
  1. Wolfgang
    Wolfgang avatar
    98 posts
    Member since:
    Oct 2012

    Posted 25 Jun 2014 Link to this post

    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

     

  2. Ady
    Admin
    Ady avatar
    589 posts

    Posted 27 Jun 2014 Link to this post

    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.
     
  3. DevCraft banner
  4. Wolfgang
    Wolfgang avatar
    98 posts
    Member since:
    Oct 2012

    Posted 03 Jul 2014 Link to this post

    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
  5. Answer
    Ady
    Admin
    Ady avatar
    589 posts

    Posted 04 Jul 2014 Link to this post

    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.
     
Back to Top