I'm not sure what I've done here but an OnRowSelect event wont trigger in this grid until I sort a column. I dunno what I've done wrong.
$cdrdata=fetch_cdr_dest('0716093060',fetchcdr("2015-08-28", "2015-08-29"));
//print_r($cdrdata); //result test
// ********** KoolControls Datagrid
$array_ds2 = new AdvancedArrayDataSource($cdrdata);
$grid_dest_cdr = new KoolGrid("grid");
$grid_dest_cdr->scriptFolder = "../koolphp/KoolControls/KoolGrid";
$grid_dest_cdr->styleFolder = "sunset";
$grid_dest_cdr->AjaxEnabled = true;
$grid_dest_cdr->DataSource = $array_ds2;
$grid_dest_cdr->Width = "400px";
$grid_dest_cdr->ColumnWrap = true;
$grid_dest_cdr->AllowEditing = false;
$grid_dest_cdr->AllowDeleting = false;
$grid_dest_cdr->AllowSelecting = true;
$grid_dest_cdr->RowAlternative = true;
$grid_dest_cdr->ShowFooter = false;
$grid_dest_cdr->AllowFiltering = false;
$grid_dest_cdr->AllowHovering = true;
$grid_dest_cdr->MasterTable->AllowScrolling = true;
$grid_dest_cdr->MasterTable->Height = "200px";
$grid_dest_cdr->MasterTable->VirtualScrolling = true;
$grid_dest_cdr->AjaxLoadingImage = "../koolphp/KoolControls/KoolAjax/loading/319.gif";
$grid_dest_cdr->MasterTable->ShowFunctionPanel = false;
$grid_dest_cdr->ClientSettings->ClientEvents["OnRowSelect"] = "Handle_OnRowSelect_Dest";
//$grid_dest_cdr->ClientSettings->ClientEvents["OnGridCommit"] = "Handle_OnGridCommit";
$column = new GridDateTimeColumn();
$column->DataField = "calldate";
$column->HeaderText = "Date / Time";
$column->AllowSorting = false;
$column->MaxLength = 100;
$column->FormatString = "d-m-Y H:i:s";
$grid_dest_cdr->MasterTable->AddColumn($column);
$column = new GridBoundColumn();
$column->DataField = "disposition";
$column->HeaderText = "Disposition";
$column->AllowGrouping = true;
$column->AllowSorting = false;
$column->MaxLength = 100;
$grid_dest_cdr->MasterTable->AddColumn($column);
$column = new GridBoundColumn();
$column->DataField = "billsec";
$column->HeaderText = "Billed(sec)";
$column->AllowGrouping = true;
$column->AllowSorting = false;
$column->MaxLength = 100;
$grid_dest_cdr->MasterTable->AddColumn($column);
$column = new GridCurrencyColumn();
$column->DataField = "cost";
$column->HeaderText = "Charge(ZAR)";
$column->Locale = "en_ZA";
$column->FormatString = "%i";
$column->AllowSorting = true;
$column->MaxLength = 100;
$column->FooterText = "R ";
$column->Aggregate = "Sum";
$grid_dest_cdr->MasterTable->AddColumn($column);
$grid_dest_cdr->MasterTable->PageSize = 150;
$grid_dest_cdr->MasterTable->Pager = new gridnumericpager();
$grid_dest_cdr->Process();
$selected_keys = $grid_dest_cdr->getinstancemastertable->SelectedKeys;
?>
<script type="text/javascript">
function Handle_OnRowSelect_Dest(sender, args) {
var _row = args["Row"];
alert('helo');
RecPlayer.attachData("rec", _row.getDataItem()["billsec"]);
RecPlayer.update();
}
</script>