Get KoolPHP UI with 30% OFF!

Bug in KoolGrid when data contains german "Umlaute"?

Klaus
Hi,
i ran into a problem when my data contains german "umlaute"
As you can see in the attached image i have a form with 2 grids grid_PRJ and grid_TITEL (master/detail).
I can e.g. choose the second and the fourth row in the master grid,
all other rows (containing "Umlaute) do not refresh the detail grid.

I use the modified code of Master-Detail-Example.
<script type="text/javascript">
function Handle_OnRowSelect(sender,args)
{
//Prepare to refresh the grid_order.
var _row = args["Row"];
grid_TITEL.attachData("PRJ_selected",1);
grid_TITEL.attachData("PRJ_KEY",_row.getDataItem()["PRJ_KEY"]);
grid_TITEL.refresh();
grid_TITEL.commit();
}
</script>
and
if(isset($_POST["PRJ_selected"]))
{
$ds_grid_TITEL->SelectCommand = "Select * from TITEL where TIT_PRJNO=".$_POST["PRJ_KEY"];
$_SESSION["PRJ_KEY"] = $_POST["PRJ_KEY"];
}
else
{
if(!$koolajax->isCallback)
{
$_rows = $grid_AUSWPRJ->GetInstanceMasterTable()->GetInstanceRows();
$_rows[0]->Selected = true;
$ds_grid_TITEL->SelectCommand = "select * from TITEL where TIT_PRJNO=".$_rows[0]->DataItem["PRJ_KEY"];
}
else
{
$ds_grid_TITEL->SelectCommand = "select * from TITEL where TIT_PRJNO=".$_SESSION["PRJ_KEY"];
}
}
Has somebody any idea how to solve this problem ?
Best regards
Klaus
Posted Jun 9, 2017 Kool
David
Hi Klaus,
Would you please console.log like this in the function Handle_OnRowSelect(sender,args):
var _row = args["Row"];
console.log(_row.getDataItem());

Then open F12 on Chrome to check each time you select a master row. Please let us know the result. Thanks!
Posted Jun 13, 2017 Kool
Klaus
Hi David,
here is the console log.
The first part is when i select a row without "Umlaut" in the data.
The second part with the uncaught URIerror results of choosing a row in the mastertable where the data in column "PRJNO" has then value "13033_Ü1".
As soon as any column contains an "Umlaut", e.g. ä,ö,ü,Ü,Ä,Ö i run into this URIerror.

Best regards
Klaus
Posted Jun 13, 2017 Kool
David
Hi Klaus,
Thanks for your feedback! Would you please try altering the getDataItem() function like this to see if it solves the problem:
console.log(_row.getDataItem(true));

Thanks!
Posted Jun 14, 2017 Kool
Klaus
Hi David,
after setting _row.getDataItem(true) everything runs smoothly.
Thanks a lot for the fast help.
Best regards
Klaus
Posted Jun 14, 2017 Kool