Hi allI have some trouble with loading large amount of datainto a UltraWinGrid.I need to load about 100'000 rows into a grid and thewait time for the user should be as smallest possible ... :-)When I execute the query in the SQL Management Studio,the result grid startes almost immediately with loading.In the WinGrid I already use OnDemand loading but it takessome seconds to show the rows. I also know why: becauseI use a DataSet to fill the Grid and the DataSet has to be loaded first.The question now is:How can I load large amount of data from SQL Server into your WinGrid ?The grid should start showing rows immediately (something like asynchron) ...Hope you understand what I mean ...Thanks for a quick feedback andbest regardsFrank UrayP.S. I would pay for a really good solution
Hi Frank,
You don't set one to the other. The UltraDataSource fires events to let you know when you need to supply it with data for any particular row. It requires some coding. The sample just generated the data in code, but your application will get the data from the DataTable - or wherever you want, really. Neither the grid nor the UltraDataSource have any knowledge of where the data comes from.
Hi MikeThanks for your help.I am right now looking at the samples.I am not clear how this would be done when I have a DataTablewith all the data in it ?Where do I have to set the DataTable to the UltraDataSource ?Thanks and best regardsFrank Uray
Which part of this is slow? Is it the loading of 100,000 rows into a DataTable? Or the binding of that DataTable to the grid?
If it's the DataTable, then I'm not sure there's very much you can do there. There are probably some third-party data source objects that are faster and more efficient than a DataTable. But I don't have any experience with specific ones.
If it's the grid, then you will want to check out the Virtual Mode sample in either the WinGrid samples explorer or the UltraDataSource samples. Setting the LoadStyle of the grid to LoadOnDemand will not do very much unless you also have a data source that can support loading data on-demand.