Jump to content


Getting "Error: -1" when Vertical Scrolling in NextGrid6

  • Please log in to reply
1 reply to this topic

#1 BelangerC

  • Members
  • 182 posts
  • Location:Richmond, CA USA
  • Interests:Alternative medicine, programming for

Posted 07 November 2022 - 06:54 PM

Hi, Boki:

Hope you are well.


This issue has been a problem ever since NextGrid6 was introduced. I used to get around it in NextGrid5 by catching the Row being < 0 in the OnVerticalScroll event. But that does not work any longer.


This happens pretty much all the time when scrolling up using the scroll bar of the grid.


My fix was to change your code, which I really do not like to do. So could you either provide an alternative or change your own code?





else if DeltaY < 0 then { Scroll Up }
     //11/7/22 CB need to stop getting Row of -1 error
     if FFirstIndex > 0 then <== I added this line and it works to stop getting a -1 row index
      if FFirstIndex < 0 then
        ShowMessage('Error: ' + IntToStr(FFirstIndex));
Thank you! (for a great component)

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,101 posts
  • Gender:Male

Posted 08 November 2022 - 09:01 PM

Thank you,


I'm trying to fix this error. It's unfortunately very unpredictable :(


I'm not able to easily recreate this bug, but for some people it happens. Can you maybe make a small demo project for me where this error happens.


I will remove this ShowMessage, but I will try to really fix this error.


Thank you.

boki@bergsoft.net | LinkedIn Profile
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
BergSoft Facebook page
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users