Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,
I hope this help,for example while any update/Insert is occur in sql one table, at that time how automatically refresh datagridview without any front end event call.My application is hosted in multiple client with centralized one server.

Replay Pls...
Palani
Posted

Newer versions of SQL Server let you run .NET code inside them. You can have a trigger that fires when a table is updated, I imagine it's feasible to have that trigger fire an event in your presentation layer, but it makes just as much sense for your code to fire an event to all clients, or for your data source to just refresh periodically. There is no way your datagridview can refresh without some sort of event firing in the presentation layer, telling it to do so.
 
Share this answer
 
I think if you need to refresh your client browser instantly when some data is inserted through other user, you need to use AJAX to repeatedly call to a service..

Say you call the server using setInterval and ping to a GUID which is there in the client. Now when the data is updated, just replace the GUID in the server, and every client which ping the service will know that the data is updated and need to refresh.

You might also go for
COMET (or Reverse AJAX) based Grid Control for ASP.NET Web Applications - Scalable, High Performance and Low Latency Grid Control[^]

which uses the similar technique as you require.:cool:
 
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