Jump to content


Alfred

Member Since 20 May 2008
Offline Last Active Apr 22 2017 12:31 PM
-----

Topics I've Started

How to intercept scrollbar event and handle it oneself

21 April 2017 - 07:52 AM

I believe "procedure WMVScroll(var Message: TWMVScroll); message WM_VSCROLL;" handles the vertical scrolls.

 

I am dealing with a massive number of rows (>10^6). I tried it but NextGrid was very slow - which is understandable.

 

I want to be able to scroll a small subset (100 rows) of the data and handle the refreshes when the user scrolls beyond this subset. In order to do this, I need to be able to intercept the vertical scrollbar events and to position correctly the thumb on scrollbar.

 

I would much appreciate a tiny example of how to do it.


Vertical scrollbar does not compensate for hidden rows

07 March 2017 - 09:36 AM

Hi,

 

I have a grid with a large number of lines (>500,000). I search for values and hide the unsuitable rows. Say, I get 100 visible rows at the end of the search, I find that the grid pretends that all the invisible rows are still there and the scrollbar is only meaningful when it is at the very top of the grid - which is not useful.

 

Any ideas?

 

Thanks

 

Alfred


Custom sort on multiple columns

07 March 2017 - 07:34 AM

Hi,

 

I just tried custom sort. It seems that there is no way to link NextGrid1Compare to a particular column and NextGrid2Compare to another column etc. All custom sorts on the same grid end up in the same compare routine.

 

One has to do if Cell1.ColumnIndex = 3 then else if Cell1.ColumnIndex = 4  etc.  in this same Compare routine.

 

Please correct me if I am missing something.

 

Is it possible to have a sort on more than one column - e.g. sort by name then by DOB - when clicking on the name header?

 

With a little effort, one can do that in TStringGrid

 

Thanks,

 

Alfred