Hi,
It is possible to autorefresh a field value every X seconds using Ajax?
Thanks
Miguel
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");
grid.jqGrid('setCell',10,'total','2000');
This will enter 2000 in row with ID(first col):10 and column 'total'
This is how i did the trick:
On Grid.Col["default"] = "<div id='state'></div>";
On same page add script:
<script>
setInterval(function () {
$('#state').load("estados.php");
}, 1000);
</script>
On estados.php
<?php
echo shell_exec('date');
?>
This sample put system time in a Cell
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.
grid.jqGrid('setCell',10,'total','2000');