Get KoolPHP UI with 30% OFF!

Filter Grid by column filter from Javascript

Jochen
Hi,
is it possible to set a filter and refresh the Koolgrid from Javascript only? I tried this as shown below, the width of the column changes (for testing, so I'm right with the reference to my objects), but the Data shown in the grid is not changing. I tried several filters. I also tried several settings for the grid in PHP, as grid>AllowFiltering with no effect.
Thanks a lot.
<script type="text/javascript">
function foo()
{
var mastertable = grid.getMasterTable();
var columns = mastertable.getColumns();
var column = columns[5];
// the column shows m for male, w for female
column.filter("Contain","m");
column.setWidth("100px");
mastertable.refresh();
grid.commit();
}
</script>
<div class="divDefForm">
<button type="button" onclick="foo()">Filter Me!</button>
...
Posted Mar 19, 2020 , edited Mar 19, 2020 Kool -
David
Hi Jochen,
This is probably a bug with the current version of KoolGrid. Please send us an email to support@koolphp.net. We will send you an updated version of KoolGrid which should fix this issue. Thanks!
Posted Mar 20, 2020 Kool -
Jochen
Thank You, David. I sent the suggested mail.
Posted Mar 20, 2020 , edited Mar 20, 2020 Kool