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
Mike,
As many people ask the same question over and over again, why don't you just give us a complete sample? Here is the common scenario:
* I have a SQL Server database and Orders table has three columns (ID, orderDate, orderAmont)
* I have setup a connection and a SqlCommand and I want to read it with SqlDataReader - say "Select * from Orders"
Could you please share a sample to get the data and bind to a WinGrid using LoadOnDemand?
Thank you
Hi Frank,
You set up the bands and columns of the UltraDataSource to mirror your DataTable and display what you want in the grid. Then you bind the grid to the UltraDataSource, just like the sample is doing. Then you set the Count of the grid rows to the count of the rows in your data table, just like the sample is doing. Then you handle the events of the UltraDataSource such as CellDataRequested, just as the sample is doing.
Hi MikeThats what I am trying to ask ...I have a UltraDataSource, a UltraGrid, a DataTable with data.What do I have to set to fill the Grid using the DataSource ??Best regardsFrank Uray
I'm confused by your confusion. :) What part of this is confusing you?
The way the million rows sample works is that there's a grid and an UltraDataSource. The UDS has it's data structure set up with columns and it fires events like CellDataRequested when it need the data for a row.The code handles this event and passes back the data to be displayed for that row.The same just uses fake data that is generated in the code. But in your case, you would use the data from your DataTable.
Hi MikeThanks for your answer,but now I am really confused ... :-))What do I have to do when I have a DataTable with all theData in it ? I would like to display this data like it isin this One million row sample .Thanks and best regardsFrank Uray