Jump to content


Photo

Scrolling with Hidden rows


  • Please log in to reply
39 replies to this topic

#1 deonvn

deonvn

    Senior Member

  • Honorable Members
  • PipPip
  • 313 posts

Posted 17 August 2007 - 12:18 PM

Hi Boki

There seems to a small problem with scrolling the grid when you have some hidden (invisible) rows.

Let's say that Row 20 is selected. If you have 5 invisible rows somewhere above the selected row and you start scrolling up using the up arrows, the selection will move up until it gets to the top row of the grid and will then disappear. You have to press the up arrow 5 more times before the grid starts scrolling again, so it's obviously got something to do with the 5 invisible rows.

(It does pretty much the same thing if you scroll up using the scrollbar).

Thanks
Deon

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 17 August 2007 - 12:28 PM

Hello Deon,

I have spot it. I will work on it now.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.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.

#3 deonvn

deonvn

    Senior Member

  • Honorable Members
  • PipPip
  • 313 posts

Posted 23 August 2007 - 04:46 PM

Hi Boki

Any news on this?

I am releasing a new version at the end of next week, and it would be great if you can find a solution before then smile.gif

Thanks
Deon

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 23 August 2007 - 04:56 PM

Hello Deon,

Not yet, but I hope in next few days.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.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.

#5 deonvn

deonvn

    Senior Member

  • Honorable Members
  • PipPip
  • 313 posts

Posted 03 September 2007 - 05:20 PM

Hi Boki

Did you get around to looking at this for the new version?

(If not, don't worry too much - you can send me the code after the new release)

Regards,

#6 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 03 September 2007 - 05:29 PM

Hello Deonvn,

I will finish it in next 2 days, and send you a quick fix.

Please sorry for my delay.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.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.

#7 deonvn

deonvn

    Senior Member

  • Honorable Members
  • PipPip
  • 313 posts

Posted 03 September 2007 - 06:00 PM

No problem.

Finish what you are doing first - you can look at it later.

Regards,

#8 deonvn

deonvn

    Senior Member

  • Honorable Members
  • PipPip
  • 313 posts

Posted 06 September 2007 - 08:23 AM

Hi Boki

Just a reminder...

I have looked around a little bit myself, but I can't find the problem sad.gif

Can you have a look, or at least point me in the right direction?

I really need this fixed by/on Saturday.

Regards,
Deon

#9 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 06 September 2007 - 11:11 AM

Hello Deon,

I will try to finish it today. I have been bussy working on some other things sad.gif

Please sorry again for delay.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.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.

#10 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 06 September 2007 - 03:27 PM

Hello Deon,

I think that I am closer to solution. Please try next:

Inside NxCustomGridControl.pas find procedure:

CODE
procedure TNxCustomGridControl.MoveSelectionUp(Shift: TShiftState);


change line

CODE
  if Row < VertScrollBar.Position then VertScrollBar.Prior;


into

CODE
  if Row < FFirstRow then VertScrollBar.Prior;


Please note that I will need some more testings, but at first test work.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.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.

#11 deonvn

deonvn

    Senior Member

  • Honorable Members
  • PipPip
  • 313 posts

Posted 06 September 2007 - 04:14 PM

Nope. Doesn't work...

The selection still moves past the top of the grid and disappears.

Any other ideas?

#12 deonvn

deonvn

    Senior Member

  • Honorable Members
  • PipPip
  • 313 posts

Posted 06 September 2007 - 04:34 PM

Update:

The fix works fine if the first (top) row in the grid is a visible row. If the (absolute) first row is invisible, the selection moves off the first "visible" row and also off top of the grid.

Regards,

#13 deonvn

deonvn

    Senior Member

  • Honorable Members
  • PipPip
  • 313 posts

Posted 06 September 2007 - 04:54 PM

No - scratch that last comment. With the new fix, the scrollbar sometimes gets stuck at the bottom and refuses to respond to keyboard Up/Down.

Quick Question:

How is SelectedRow supposed to work when a grid is sorted? Is SelectedRow re-indexed, or does each row keep its "absoulte" index?

The reason I ask is becase in the MouveSelection procedure you have code like:

CODE
    for i := SelectedRow downto 0 do
      if GetRowVisible(i) and (i <> SelectedRow) then begin
        Row := i;
        Break;
      end;


The problem is that if the grid is sorted, the index of any given row keeps changing.

If I select one row and check the Selected Index for that row, it shows "30". If I then sort the grid and check the Selected Index for that exact same row again, it now shows "3". If I sort the grid in the other direction again (back to where it was) the Index is now "15".

It looks to me like the problem here is with the indexing of the rows when they are sorted, if some of the rows are that are being sorted are invisible?

Don't know if that helps?

#14 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 06 September 2007 - 04:54 PM

Hello Deon,

If I understand, when RowVisible[0] = False, bug still occur?

Thank you, I hope that I am closer now to the solution.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.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.

#15 deonvn

deonvn

    Senior Member

  • Honorable Members
  • PipPip
  • 313 posts

Posted 06 September 2007 - 05:39 PM

Hmmm... I checked it again, and the problem is not with the indexing. The indexing works correctly.

It has to be something else then...

#16 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 06 September 2007 - 05:55 PM

Hello Deon,

I have see now that you have replace previous post. I will read it again.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.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.

#17 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 06 September 2007 - 08:08 PM

Hello Deon,

It look harder than I think. I will definitelly need more time (1-2 days), because I am planing to made some changes. I hope that your application will not suffer until then.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.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.

#18 deonvn

deonvn

    Senior Member

  • Honorable Members
  • PipPip
  • 313 posts

Posted 06 September 2007 - 08:38 PM

No problem.

I can wait a day or two...

regards,

#19 deonvn

deonvn

    Senior Member

  • Honorable Members
  • PipPip
  • 313 posts

Posted 09 September 2007 - 02:52 PM

Hi Boki

How's the progress on this coming along? Do you think you will still be able to finish it today?

Regards,
Deon

#20 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 09 September 2007 - 03:10 PM

Hello Deon,

I am progressing with it, but not be able to finish it today. Tuesday is a final date. I have fix this bug, but with changed concept and need to change now some other code.

In tuesday it will be definitelly done.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.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