Grid and filtering by field with LINK

Greetings…
In V30 I’ve noticed that filtering in field with link info in it does not works properly. It (by default) filters by whole string value (like exact_value), and so on returns a lots of irrelevant results.

Tried a hell lot of options here, and ended up with just re-defining search mechanism, just like the default one should be…

        some_grid.attachEvent("onFilterStart", function(indexes,values){
			   if (indexes[0] == 0 && values[0] != "")
			   {
			        some_grid.filterBy(1,function(data){
				return data.toString().indexOf( values[0])!=-1;				
			   });
			   return false;}
			   else
			   {return true;}
        });

My fix in my case was developed ONLY for first column, but it can be expanded to dynamicaly check wich cloumns to overload by their types…
Not by me, I’ve lost few hours on this one allready :slight_smile:
Hope this will save someone else’s day…
Sincerely.

Sorry, was wrong… Default way worked cus i had hidden column with pure values…

replace string in center from

return data.toString().indexOf( values[0])!=-1; 

to

return data.toString().split("\^")[0].toLowerCase().indexOf(values[0].toLowerCase())!=-1;				

and everything will work…
PS regexp specialists are welcome to improve this one )) Quite dirty solution…