When the user clicks a button on the page, a javascript is called which adds a new element to the array.
The grid is contained in an <updatepanel> and after the array element has been added the updatepanel is updated.
I have in the updatepanel a thing called Krumo which is a fancy formatted print_r - it displays the array with the newly added element.
The grid however does not show the added element until the refresh button on the grid is clicked at which point the grid catches up to the data in the $_SESSION array.
My question is - how do I get the grid to reload the array programatically with Ajax so the grid reflects the current state of the underlying array?
The updatepanel contains
<?php echo KoolScripting::Start(); ?>
<updatepanel id="second_updatepanel">
<content>
<![CDATA[
<div style="min-height:100px;padding-top:10px;">
<?php
$grid_apps->refresh();
echo $grid_apps->Render();
if ($_SESSION['authAdmin']) {
krumo($_SESSION);
}
?>
</div>
]]>
</content>
<loading image="<?php echo $KoolControlsFolder; ?>/KoolAjax/loading/5.gif" />
</updatepanel>
<?php echo KoolScripting::End(); ?>