dbgrid scrollbars lazarus / 7-LCL ---------------------------------------------------------------------- lordoza · 2006-08-21 14:57 Hi, im developing some database app under win32 which use dbGrid to show some data , when i load data to dbGrid from SQLQuery vertical scroll bar is always the same and it is "calculated" after scrolling down its very annoying. It is normal ? im using latest snapshot. ---------------------------------------------------------------------- Kknd · 2006-08-21 17:09 Im using the latest snapshot too, but i dont have this problem. But im using a SQLite db. Win 32 too. ---------------------------------------------------------------------- jesusr · 2006-08-21 22:54 Quote from: "lordoza"Hi, im developing some database app under win32 which use dbGrid to show some data , when i load data to dbGrid from SQLQuery vertical scroll bar is always the same and it is "calculated" after scrolling down its very annoying. It is normal ? im using latest snapshot. This is the normal behaviour, the grid doesn't retrieve all records when you open the dataset, it only retrieve the needed visual records. Some dataset implementatios do retrieve all records as Tdbf and it seems sqlite also. For SqlQuery you can fetch all records when you open the dataset by setting PacketRecords property to -1 in object inspector or if you want to do it in code and your dataset is ds then: Code: [Select] ds.PacketRecords:=-1; ds.Open; ---------------------------------------------------------------------- lordoza · 2006-08-22 06:06 it works like a charm! thanks jesusr! and... i have another question about dbgrid scrollbars is it posible to refresh view (records) when scrolling? thanks! ---------------------------------------------------------------------- Marc · 2006-08-23 09:35 Fetching all records is fine for small datasets, but be carefull when a query might return 1mil records. Side note, some db implementations return the number of records a query will return, without fetching all records.