Re: DBGrid scroll bars



FrancoJommi wrote:
"Bjørge" <bjorge@xxxxxxx> ha scritto nel messaggio
news:5O6dnRNFsbZJ4frYRVnzvQ@xxxxxxxxxxxxxx
FrancoJommi wrote:
I want the vertical scroll bar of a DBGrid to show when needed only
(.i.e. when number of rows exceed given space). Is it possible ?

Not very easy, really, because the concept of a TDBGrid is that you
only know whether you're at BOF, EOF or somewhere inbetween. Nothing
within that control knows whether the underlying dataset contains 10
or 10 million records. It only knows it needs e.g. 10 record buffers
to keep data for number of visible records.

I found the InfoPower DBGrid has the capability I need. In fact it
has a property enabling scroll bars or not, but it is possible to
match DBGrid lines and dataset recordCount and act accordingly.

Yes, I know. Not that the InfoPower grid has a proportional scroll bar, but
that it can be done. Only catch is, you need to retrieve all your records
before knowing how many there are. Of course, if you know that this will
never be an issue, go ahead. Now that you will probably think of this reason
if retrieving your data should slow down, it's safe ;-)

--
Bjørge
bjorge@xxxxxxxxxxxx


.