at999
asked on
silverlight datagrid - WCF Service Data auto refresh
i have silverlight page, it has a datagrid. I have created a WCF service which generates data for that datagrid. In my silverlight page, i call that service as shown below
MyService.MyServiceClient mysvcclient1;
mysvcclient1= new MyService.MyServiceClient( );
mysvcclient1.GetDataGridDa taComplete d += new EventHandler<MyService.Get DataGridDa taComplete dEventArgs >(Complete dHereGetDa taGrid);
mysvcclient1.GetDataGridDa taAsync();
mysvcclient1.CloseAsync();
}
now i want to refresh that data every 30 seconds... what is the best way to do that?
thanks....
MyService.MyServiceClient mysvcclient1;
mysvcclient1= new MyService.MyServiceClient(
mysvcclient1.GetDataGridDa
mysvcclient1.GetDataGridDa
mysvcclient1.CloseAsync();
}
now i want to refresh that data every 30 seconds... what is the best way to do that?
thanks....
ASKER
can you pl give the code? thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks so much gauthampj, will my GUI be stuck when i start DispatcherTimer ? i mean if i start DispatcherTimer will user be able to click other buttons on my silverlight page? please help,,,, many thanks
since the service call itself is async it shudnt make any diff to the user.
ASKER
thanks a lot
ASKER
i was able to do the way you advised thanks again
Not even few points for me...idea was mine.
ASKER
oh how did i miss it... i am so sorry apeter,,, next time....
1. When making call , stop the timer.
2. When the async call comes back , start the timer.