To enable filter as per your suggesstion one needs field name.
We enable filter for all datagrids in one central location as follows:
if (specialFilters.length > 0) {
$('#'+datagridSelector).datagrid('enableFilter', specialFilters); // enable filter with given special filters
} else {
$('#'+datagridSelector).datagrid('enableFilter'); // enable filter with type textbox
}
As you can see, there is no datagrid-field information given for textbox-based filters. Special filters are combobox or datebox or numberbox filters which contain field-name and corresponding options...
For time being I found a workaround by adding the following line directly in source code file "
datagrid-filter.js":
input.attr('placeHolder', 'enter filter text here ...');
This works but I am looking for a possibility to do the same -
by default - for all filter-enabled datagrids without modifying the source code.
Perhaps by extending the filter - plugin in my code. But the problem is, setting the prompt after the textbox is initialised effects the textbox size! Any ideas in this direction are welcome ...