"The Fox" <be******@hotmail.com> wrote in message
news:e9**************@TK2MSFTNGP10.phx.gbl...
My VB.NET application will call a remote Web Service function
that returns lots of data for reporting purpose.
The data is finally binding to a DataGrid. It does take time!
Is there any ways to load data from web services incrementally?
e.g, per DataRow? or per 10 DataRow? or Per DataTable? or others?
I just want to let user to view the data immediately after they are ready
although the data may not be complete while the data is still loading.
Thanks in advance.
The Web Services infrastructure has no built-in support for loading data
incrementally, you'll have to implement it yourself.
One way to do this would be to have your web method to return e.g., N
DataRows per call. Add another parameter to the web method that indicates
which 'page' is being returned. In the client application you can fetch the
first N DataRows synchronously and show them as soon as the call returns.
Then continue fetching data asynchronously in the background page by page
until you have it all.
Regards,
Sami