Refresh Button?

Hi

I usually use this code as java button in grid to refresh on demand and get latest available information from this grid SQL query

window.location.reload();
history.go(0);
window.location.href=window.location.href;

But recently found out that is not refreshing correctly… I have gif image in the grid header, it does continue… while i want it to really “refresh” the whole page

do you guys have any other idea or button code to use in grid in order to refresh everything correctly!?

In stead of javascript a button with: exit(sel) ?

How to do that Albert? just put this code in a new button? i want a refresh button that really refreshes the gird/form :smiley:

Yes, create a new button and add this code. It will cause to restart your application, which - in effect - is a full refresh.

The easy way: Grid / Settings / Refresh Interval …

YES Albert, worked perfectly as Required :smiley: Thanks dude

sc_exit(sel);

Thanks RHS too, I’m using that, but wanted extra button to refresh on demand

Cheers

hi,

Be careful if you use global variables in the sql stmt.
I use sc_exit(sel) in some button and I remember to had some problems.

I remember something as that values of global variables is assigned once first time the application enter.
If global variable change value during execution, the new value is not refreshed when sc_exit(sel) is executed.

Regards

JMiguel

In that case you can do a sc_redir to the same application and set the global in the parameter list.

Hi I also need a refresh button for a Form application, I tried the sc_exit(sel) button and it does not do anything. and the
window.location.reload(); history.go(0); window.location.href=window.location.href; option just kicks me out of the application and goes back to the previous one.
what is the best way to set the refresh button in the application?

thanks

hello
that works with the form. use php button type and sc_exit(sel);

Why doesn’t scriptcase add that button among toolbar buttons?

I have a different requirement. I need to refresh a different grid when the data is changed in another grid. I have a dashboard application with the 2 grids and one grid is filtered based on the selection in the other.
Is it possible to refresh the entire dashboard when the data is changed in one of the grids?

Clarification: the filtering app is a ‘control’ type application.