BoldSign®Effortlessly integrate e-signatures into your app with the BoldSign® API. Create a sandbox account!
Index.php
<? php
$col1 = new EJ\Grid\Column();
$col1 -> field("help_topic_id") -> headerText("OrderID") -> isPrimaryKey(true) -> textAlign("right") -> width(100);
$col2 = new EJ\Grid\Column();
$col2 -> field("name") -> headerText("CustomerID") -> width(70);
$col3 = new EJ\Grid\Column();
$col3 -> field("help_category_id") -> headerText("EmployeeID") -> textAlign("right") -> tooltip("#coltip") -> width(70);
$gridColumns = array($col1, $col2, $col3);
$dataManager = new EJ\DataManager();
$dataManager -> url('http://localhost/grid/data.php') -> updateUrl('http://localhost:8085/grid/update.php') -> insertUrl('http://localhost:8085/grid/insert.php') -> removeUrl('http://localhost:8085/grid/delete.php') -> adaptor('UrlAdaptor');
$grid = new EJ\Grid("Grid");
. . . .
echo $grid -> dataSource($dataManager) -> columns($gridColumns) -> allowPaging(true) -> allowSorting(true) -> render();
?>
<script type="text/template" id="coltip">
This is the customized tooltip which shows another column {{:name}}value //define tooltip value of the name column in help_cateory_id column
</script> |
Index.php
<? php
$col1 = new EJ\Grid\Column();
$col1 -> field("help_topic_id") -> headerText("OrderID") -> isPrimaryKey(true) -> textAlign("right") -> width(100);
. . . .
$stackedHeaderColumn = new EJ\Grid\StackedHeaderColumn();
$stackedHeaderColumn -> headerText("OrderDetails") -> column(array("help_topic_id", "name")) -> textAlign("center"); //define StackedHeader columns using columns property
$stackedHeaderColumns = array($stackedHeaderColumn);
$stackedHeaderRow = new EJ\Grid\StackedHeaderRow();
$stackedHeaderRow -> stackedHeaderColumns($stackedHeaderColumns);
$stackedHeaderRows = array($stackedHeaderRow);
echo $grid -> dataSource($dataManager) -> dataBound('someFunction') -> columns($gridColumns) -> allowPaging(true) -> showStackedHeader(true) -> stackedHeaderRows($stackedHeaderRows) -> allowSorting(true) -> render();
?> |