Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 26th, 2006, 11:02 AM
Registered User
Join Date: May 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Updating Datagrid From Dataset Issue

I have a webservice that is returning a dataset to a windows form client, the webservice is triggered by a timer event using a timer inside the form after pushing a start button, when i try and update the datagrid with the updated dataset it doesnt update. However if i update the datagrid from the dataset using a button click event it is fine??

Any ideas anyone??

Old May 28th, 2006, 07:08 AM
Authorized User
Join Date: May 2004
Posts: 83
Thanks: 0
Thanked 1 Time in 1 Post

Are you calling the web service synchronously or asynchronously? Looks like before your code has a chance to update the DataSource of the DataGrid on your Form, the Timer Tick sends your code again to grab data from the server. Probably it might help to make sure unless you've gotten finished with results of the Web Service call, you don't call the service again. A boolean flag can help you do that.

If you're calling the service asynchronously, make sure you've specified a callback method that would be called when results of the Web Service call are available. You would bind the resultant DataSet to the DataGrid from within the callback method.

Hope it helps.

Old May 30th, 2006, 12:19 PM
Registered User
Join Date: May 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

thanks very much for your reply, i've sorted it now, i have used a windows.forms.timer rather han a system.timer an it seems to have solved the process

Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating Database from Dataset hexOffender VB Databases Basics 0 October 30th, 2006 12:40 PM
updating a dataset hexOffender VB.NET 2002/2003 Basics 1 September 28th, 2006 05:13 PM
Updating Database w/Dataset -Failure KennethMungwira ADO.NET 5 April 24th, 2006 04:54 AM
problem in updating in dataset vohra_vikas2004 ADO.NET 1 June 28th, 2005 05:26 AM
NullReferenceException updating a DataSet rows yoord BOOK: Beginning ASP.NET 1.0 7 September 1st, 2004 03:49 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.