With KoolGrid, you can define your own grouping in coding. Basically, you need to create GridGroup's object and add it to the GridTableView that you want to show the group.
You can:
- - Group by any available fields from SelectCommand.
- - Customize the header text of the group.
- - Customize the summary information of each groups.
- - Show group aggregate information.
You may have a look at our example for more details.
span style="color: #ff0000;">"/KoolAjax/koolajax.php";
$koolajax->scriptFolder = $KoolControlsFolder."/KoolAjax""/KoolGrid/koolgrid.php"//This $db_con link has been created inside KoolPHPSuite/Resources/runexample.php
$ds->SelectCommand = "select CONCAT(employees.firstName,' ',employees.lastName) as employee_name,addressLine1,CONCAT(reportsTo_employees.firstName,' ',reportsTo_employees.lastName) as supervisor_name,employees.jobTitle from employees,offices,employees as reportsTo_employees where reportsTo_employees.employeeNumber=employees.reportsTo and employees.officeCode=offices.officeCode""grid");
$grid->scriptFolder = $KoolControlsFolder."/KoolGrid";
$grid->styleFolder="default""655px""/KoolAjax/loading/2.gif""employee_name""Name""jobTitle""Title""supervisor_name""Supervisor""addressLine1""Office Address"//Allow Grouping
//Show Group Panel
//Define grouping by address and supervisor
"addressLine1";
$group->AddInfoField("addressLine1");
$group->InfoTemplate = "Those people who work in [{addressLine1}]""Address""supervisor_name";
$group->AddInfoField("supervisor_name""Supervisor";
$group->InfoTemplate = "Reports To: {supervisor_name}""form1" method="post"