KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Update a table cells or columns without reload all table #2420

Open Paulo Costa opened this topic on on Nov 5, 2021 - 1 comments

Paulo Costa commented on Nov 5, 2021

Hi,

I'm trying to create an interface with a table using koolreport, the table is automatically updated in a certain time interval using ajax, That creates the entire table, however what I intend is to automatically update only some cells\columns and not the whole table. Is it possible to do this with koolreport using tables or datatables?

Thanks

Sebastian Morales commented on Nov 8, 2021

Hi Paulo,

It's a pity there's no method to only update some table cells or columns. If you have large data and worry about inefficiency DataTables widget has a serverSide property that only retrieve data for the current page (10, 20, or 50 rows, etc):

DataTables documentation

serverSide example

Using this property you can also set an interval to automatically update the table:

DataTables::create(array(
    "name" => "MyTable",
    "serverSide" => true,
    ...
    "onReady" => "function() {
        setInterval( function () {
            MyTable.ajax.reload(); //MyTable is the name as well as js object of this DataTables
        }, 30 * 1000 ); // auto refresh data every 30 seconds
    }"
));

Let us know if you have any question. Tks,

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed

None