Jump to content

UniDBGrid Event issue on Change Record


Hassan

Recommended Posts

There is an issue with UniDBGrid when user clicks on first row. First BeforeScroll event of Dataset occurs, then AfterScroll event happens. Again BeforeScroll happens but AfterScroll does not happen. This cause some issues, as I close some dataset on beforescroll and open them afterscroll.

Steps to reproduce:

  1. Click on a row in grid other than First row
  2. Now, Click on first row
    1. Before scroll event happens
    2. After scroll event happens
    3. Before scroll event happens
  3. The issue is After scroll event does not happen after second Beforescroll event

I analyzed the uniDBGrid.pas code and believe it is related to following two lines.

    DD.First;
    DD.MoveBy(ARecNo);

Could you please add following if condition? This way, DD.MoveBy(0) is not called. Hence, the extra call for Before scroll does not happen.

193584088_DBGRID-firstrowissue.png.5811557ffed7e8af21f10656fefd1b43.png

uni-1.50.0.1479

Thanks.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...