Get KoolPHP UI with 30% OFF!

Message from Grid Eventhandler

Michael Meyer
Dear all,
how can I return a error message if an event is invalid?
Currently the event handler for koolgrid is set up like:
class MyGridEventHandler extends GridEventHandler
function OnBeforeConfirmInsert($tableview,$args)
//$tableview: The grid tableview object.
//$args["NewDataItem"]: New dataitem
return true;
It returns true or false, but in case of false how can I display a message in grid?
Posted Oct 4 Kool
Anthony Amolochitis
Say I want to insert data, but it fails. I want to keep the data fields populated with the values a user input while leaving the grid in insert mode.
Since insert failed, I can add a javascript window alert message outputting the error message.
I implement this using the insert template as well. It gives me complete control on how I want the grid to behave.
I have some samples I added to the forum if you want to try them.
Posted Oct 8 Kool