I have a very simple query and allows searching on the resulting grid. I would like to set the search format to only "begins with" so that if I type "warren," it filters only the items in that column that begin with "warren." Currently the search finds any entries that contain "warren" anywhere in that column. Here's what I have so far:
<?php
$dg = new C_DataGrid("SELECT ID, Last_Name, Section, Location FROM Complete", "ID", "Complete");
$dg -> set_col_hidden("ID");
$dg -> set_pagesize(100);
$dg -> set_scroll(true);
$dg -> enable_resize(true);
$dg -> enable_autoheight(true);
$dg -> enable_autowidth(true);
$dg -> enable_search(true);
$dg -> display();
}
?>
<script type="text/javascript">
$(function() {
var grid = jQuery("#Complete");
grid[0].toggleToolbar();
grid.colModel.config[1].sortable = false;
});
</script>
This Api is not support by our product.
You might want to check http://www.phpgrid.com