Click here to Skip to main content
15,892,517 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to display 25 lakhs records in a grid. Currently it takes 5 minutes to load all data in grid. I want to use streaming technique of WCF so that as soon as data available from query it will display on screen & query processing runs in background to retrieve rest of the data.
Posted

1 solution

You should reconsider if it really makes sense to display 2,5 million records at once in a DataGrid. Who is supposed to read through it before falling asleep? ;)

However, if you really want to proceed with that idea: You can't stream the whole DataSet at once and display the arriving "parts" of it incrementally. In order to reconstruct an object, it has to be received fully. Instead you have to modify the service to send the records in pages and then add these to the data source of the data grid as they arrive or (if you're talking Windows Forms and DataGridView here) use the DataGridView in VirtualMode[^].

For this you can but don't have to use WCF-streaming. I found an MSDN-Blog that might be helpful: Custom WCF Streaming[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900