I am using KoolGrid with pager, but the pager buttons don't work.
Instead I am only seeing javascript: void 0 when I click a link or button.
What I am missing here?
<?php
/*
* Please put this file in the same folder with KoolControls folder
* or you may modify path of require and scriptFolder to refer correctly
* to koolgrid.php and its folder.
*/
require "KoolControls/KoolGrid/koolgrid.php";
$db_con = mysql_connect("localhost","sakila","caroline");
mysql_select_db("sakila",$db_con);
$ds = new MySQLDataSource($db_con);
$ds->SelectCommand = "select actor_id, first_name, last_name from actor";
//$ds->UpdateCommand = "update tblUsers set name='@name' where id='@id'";
//$ds->InsertCommand = "insert into tblUsers(id,name) values('@id','@name')";
//$ds->DeleteCommand = "delete from tblUsers where id=@id";
$grid = new KoolGrid("grid");
$grid->scriptFolder = "KoolControls/KoolGrid";
$grid->DataSource = $ds;
$grid->styleFolder = "default";
$grid->Width = "655px";
$grid->AjaxEnabled = true;
$grid->KeepRowStateOnRefresh = true;
$grid->MasterTable->AllowHovering = true;
$grid->MasterTable->AllowSelecting = true;
$grid->MasterTable->AutoGenerateColumns = true;
$grid->MasterTable->AutoGenerateDeleteColumn = false;
$grid->MasterTable->AutoGenerateExpandColumn = false;
$grid->MasterTable->Width = "655px";
$grid->MasterTable->RowAlternative = true;
$grid->MasterTable->Pager = new GridPrevNextAndNumericPager();
$grid->Process();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>KoolGrid</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
</head>
<body>
<?php echo $grid->Render(); ?>
</body>
</html>
Best regards,
Michael