For text columns, if I enter text in the filter box for that column, I get a match on the entered text if the text if anywhere in the data for that column. For example
Row 1 data…
This is a test.
Row 2 data
Testing of the second row.
When I enter the term "test" in the filter box, I see both rows since they both contain the term "test". Is there a way to "anchor" the search term to the beginning of the line? So that entering the term "test" (or whatever anchors the search term) in the filter would display only the row(s) that begin with test. This is like using the "%" in the sql function "like".
You can edit lib/inc/jqgrid_dist.php and replace cn with bw (begins with)
jQuery("#<?php echo $grid_id?>").jqGrid('filterToolbar',{stringResult: true,searchOnEnter : false, defaultSearch:'cn'});
with:
jQuery("#<?php echo $grid_id?>").jqGrid('filterToolbar',{stringResult: true,searchOnEnter : false, defaultSearch:'bw'});