ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: RedBully on November 03, 2014, 05:58:07 pm
-
I'm trying to use the callback for filter type as per
http://paramquery.com/pro/api#option-column-filter (http://paramquery.com/pro/api#option-column-filter)
type can be textbox, textarea, select, checkbox, callback function, html string or null. subtype can be triple for tri - state checkbox.
In my column model, I use
filter:
{
type: function (ui) { oa.renderFilter(this, ui); }
},
where my called method is
oa.renderFilter = function (grid, ui) {
return "<div>Test</div>";
}
The table cell where the filter should be rendered is empty:
<td class="pq-grid-col"><div class="pq-grid-header-table-div" style="padding:0px 2px;"></div></td>
Am I correct to be returning html which should then be rendered or am I using the callback incorrectly?
I couldn't find a suitable example to copy in
http://paramquery.com/pro/demos/filter_header_local (http://paramquery.com/pro/demos/filter_header_local)
-
You are correct in returning HTML string, but first return is missing from your code.
type: function (ui) { return oa.renderFilter(this, ui); }
-
Of course! Thanks very much!