We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Implement a Virtual Data Grid with OLE DB

Thread ID:

Created:

Updated:

Platform:

Replies:

30295 Jun 15,2005 09:35 AM Jun 15,2005 10:15 AM Windows Forms 1
loading
Tags: GridControl
John Hawksley
Asked On June 15, 2005 09:35 AM

For a Windows Application, I have very large data files in SAS format which need to be displayed in a data grid. Due to the size of the files, simply filling a dataset and keeping it in memory is not an option. SAS can talk to OLE DB (and also OBDC and others). One way might be to store a subset of the data in a dataset, and somehow retrieve a new subset, and refresh the grid whenever needed. I don''t really know how to do this. Alternatively, is there a way that I can implement a Virtual Data Grid? I wouldn''t know how to go about writing procedures, as required, to talk to the SAS file and retrieve the value at a row,col position, the number of rows, and the number of columns. Has anyone done something like this before? Thanks in advance.

Administrator [Syncfusion]
Replied On June 15, 2005 10:15 AM

Here is the sample that shows one way to page data into a virtual grid.. In QueryCellInfo, it checks for the data availability and if needed, loads the data as you scroll over. It simulates having a 1,000,000-row datasource that is loaded in pages of at most 200 rows. It does this using a virtual grid. At the beginning of QueryCellInfo, there is a call to a DataSource method that ensures the requested row is available. If it is not, the DataSource loads a 200-count range of records with the requested record in the middle. In this sample, loading new data creates a new 200 row datatable using code. In a real application this table would come from some kind of database query to retrieve a batch of records containing the requested one. In the sample, all this happens very quickly. In a real application, accessing the database will likely be an expensive operation, so bigger page sizes may make sense. Or, you could try to use multiple threads to ''preload'' anticipated batches on different threads so they would be available when needed. Of course, this adds complexity to the coding to make sure the threads are interacting properly. But the basic idea would still be the same. At the start of QueryCellInfo, you somehow have to make sure the requested data is available. If it is not, then you have to get it. Exactly how you would handle the paging with your SAS db, I do not know.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;