Grid select filter, return text value of option not id

Grid is set by connector, in xml i have this set of options for select column with #connector_select_filter.

<coll_options for="1">
<item value="1" label="textový"></item>
<item value="2" label="celočíselný"></item>
<item value="3" label="desetinné číslo"></item>

but filter is created like

<select style="width: 90%;">
<option value=""></option>
<option value="textový">textový</option>
<option value="celočíselný">celočíselný</option>
<option value="desetinné číslo">desetinné číslo</option>

and i have custom filtering with this function

				grid.filterByAll = function () {
					var filters = {};
					for (var i = 0; i < grid.getColumnsNum(); i++) {
						var $filterElement = $(grid.getFilterElement(i));
						filters[i] = $filterElement.val();
					cell.app_settings['_s']['f'] = filters;
					$.grid.reloadGrid(cell, true);
					return true;

but of course grid.getFilterElement(i).value returns the text value not the id

correct is 2 for value celočíselný, not celočíselný which is returned

the solution is in this post