Ajax auto refresh field value

QuestionsAjax auto refresh field value
Miguel asked 7 years ago


It is possible to autorefresh a field value every X seconds using Ajax?



5 Answers
Abu Ghufran answered 7 years ago

There is no built in option for that.

You can have custom JS code that calls you ajax with setTimeout and
to set in grid's field you can use this syntax:

var grid = $("#list1");

This will enter 2000 in row with ID(first col):10 and column 'total'

Miguel answered 7 years ago

Thanks mate 😉

Miguel answered 7 years ago

This is how i did the trick:

On Grid.Col["default"] = "<div id='state'></div>";

On same page add script:

setInterval(function () {
}, 1000);

On estados.php

echo shell_exec('date');

This sample put system time in a Cell

Abu Ghufran answered 7 years ago

Yes, but it's out of the scope of grid.
That's custom JS work to be done manually.

Grid api is available to integrate, like mentioned in last reply. e.g.

C3media answered 7 years ago


It´s possible to use the above code but calling function in same grid?


Your Answer

4 + 12 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?