These can are the same every time, so reuse it.
Here is a sample of how you can take advantage of this with KoolGrid client events.
class KoolGridClientEvent
{
const OnGridLoad = 'OnLoad' ;
const OnGridInitialize = 'OnInit' ;
const OnBeforeDetailTableCollapse = 'OnBeforeDetailTableCollapse' ;
const OnDetailTableCollapse = 'OnDetailTableCollapse';
const OnBeforePageChange = 'OnBeforePageChange';
const OnRowDelete = 'OnRowDelete' ;
const OnRowSelect = 'OnRowSelect' ;
const OnRowDeselect = 'OnRowDeselect' ;
const OnRowCancelEdit = 'OnRowCancelEdit';
const OnRowConfirmEdit = 'OnRowConfirmEdit' ;
const OnCancelInsert = 'OnCancelInsert' ;
const OnConfirmInsert = 'OnConfirmInsert';
}
Then, when you set up your client events on the grid, you can do it this way.
...
$this->KoolGrid->ClientSettings->ClientEvents[KoolGridClientEvent::OnRowSelect] = "Handle_OnRowSelectTrackingWebLeadOrderSetup";
$this->KoolGrid->ClientSettings->ClientEvents[KoolGridClientEvent::OnConfirmInsert] = "Handle_WebLeadOrderSetupValidation";
$this->KoolGrid->ClientSettings->ClientEvents[KoolGridClientEvent::OnCancelInsert] = "Handle_WebLeadOrderSetupValidation";
...