Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » CExtGridWnd in virtual mode Collapse All
Subject Author Date
Hans Peter Miedeck Nov 6, 2006 - 1:40 PM

Hello,
Is it possible to make a "CExtGridWnd List" like this?

http://www.codeproject.com/listctrl/virtuallist.asp

Technical Support Nov 7, 2006 - 1:05 PM

Yes, this is fully supported in the Prof-UIS grid. The solution is based on coding a CExtGridDataProviderRecordSet-derived class and implementing all the abstract methods. The cacheable and virtual grid windows are demonstrated in the AdoRecordsetView sample. Open the recordset options dialog and specify database connection settings and an SQL Query. Now you can click OK to see the results in the grid window. There is a check box in the recordset options dialog: Use Virtual Mode. If it is checked, data are displayed in the virtual mode. If it is unchecked, the simple cacheable mode is used instead. In fact, both modes are based on caching. This means the grid window keeps only data records which are visible on the screen. But simple cacheable mode is based on a database recordset with a known number of rows in the query result and you can see the vertical scrollbar that is working classically. The virtual mode is based on a recordset with an unknown number of rows. The vertical scrollbar in the virtual mode can have only three states: top, middle and bottom. The virtual database recordset knows only the current record position and whether the current record at this position is the first and/or last record in the returned table. This explains the meaning of the grid virtual mode and the behavior of the scroll bar in this mode. The virtual mode can be used if the data base API supports only this kind of recordset or if you have a very large scrollable data range which often becomes updated dynamically. The Prof-UIS grid window supports the cacheable and/or virtual scrolling strategies in both horizontal and vertical directions even at the same time. So, scrolling an unlimited data source is not a problem.