I can't find an option to hide the search box.
Is there an option ?
Should I be doing that by setting the class to hidden via Javascript?
Thanks, F
I don't know if this is the best solution but you can add an empty string for the search template
$(...).bootgrid({
// ...
templates: {
search: ""
}
});
I guess the Andreas answer is better for you, but also you can override the header of your table with the:
$("#grid").bootgrid({
templates: {
header: "<your header>"
}
});
More explanations are here: https://github.com/rstaib/jquery-bootgrid/issues/82
So the default header template is:
header: "<div id=\"{{ctx.id}}\" class=\"{{css.header}}\">
<div class=\"row\"><div class=\"col-sm-12 actionBar\"><p class=\"
{{css.search}}\"></p><p class=\"{{css.actions}}\"></p></div></div></div>"
You can find it in the source code where all default templates are defined (it is about 1210 row number of the jquery.bootgrid.js
file).
In your case you just need to take original header, override it in your bootgrid settings and there hide or remove (if you need) or set the extra id or css class to the: <p class=\"{{css.search}}\"></p>
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With