AlejandroR
AlejandroR

Reputation: 5201

lightswitch automatic refetch of entity after updated

In a mssql database a trigger is updating a field in a table after some other field from the same row is being updated. In a lightswitch application after the update is executed the values updated by the trigger are not shown automatically in the screen, only after hitting the refresh button they are shown. What would be the most efficient way to accomplish that after updating the entity is refetched, without having to call the refresh button?

Upvotes: 1

Views: 3403

Answers (2)

SkeetJon
SkeetJon

Reputation: 1491

This code enables you to auto refresh queries after any given time interval

http://www.lightswitchspecial.com/2012/02/autorefresh-lightswitch-screen.html?m=1

Might be of use

Upvotes: 0

Michael Washington
Michael Washington

Reputation: 3075

If possible I would not use the trigger.

If you must use the trigger, you can call .Refresh() on the Entity programatically.

Upvotes: 1

Related Questions