Hello,
I have a date column in a grid, that I want to filter, but I would need to change the filter value before the grid sends it to the server, namely, to reformat from dd.mm.yyyy to a MySQL format and set it back to the filter, so that this new value is sent instead of what the user writes into the filter. Is there any way to do this without creating new filters from code and interfering with the other column filters (like simply just change the value in the current filter)? I can extract the filter value, but I can’t find anything to change it in the filter to the new value. I console.loged the filter and it seems to have a setfilterat, but I don’t find it anywhere documented … any solutions?
So far a got this far:
jQuery(gridid).bind('filter', function (event)
{
var filterinfo = jQuery(this).jqxGrid('getfilterinformation');
for (i = 0; i < filterinfo.length; i++)
{
if(filterinfo[i].filtercolumn == 'date')
{
var filter = filterinfo[i].filter.getfilters();
console.log(filter);
console.log(filterinfo[i]);
filter.value = '2014-05-20';
// it has filterinfo[i].filter.setfilterat( ??? )
break;
}
}
console.log('dome');
});
Thanks.