Jump to content


Photo

IsRowInView problem


  • Please log in to reply
1 reply to this topic

#1 4rc

4rc
  • Members
  • 7 posts

Posted 01 December 2008 - 09:40 PM

Hi,

I need to scroll a particular row in view if it is currently not visible. Therefore I tried to use method 'IsRowInView', but it doesn't worked as expected. Looking at the code of 'function TNxCustomGridControl.IsRowInView':

CODE
function TNxCustomGridControl.IsRowInView(const Index: Integer): Boolean;
begin
Result := SelectedRow < Pred(FFirstRow + GetVisibleCount);
end;


this method doesn't respect parameter 'Index'!
Here my corrected version:

Result := (Index < (FFirstRow + GetVisibleCount)) and (Index >= FFirstRow);

Best regards

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 02 December 2008 - 12:09 AM

Hello,

I have replace it, it will be in next release too.

Thank you,

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.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users