advanced text_filter in grid/treegrid

Hi all,

filtering with a text filter is possible - no problem.
I am looking for a solution for some advanced searching with wildchars and other usefull stuff.

Normally if you filter by “us” it will give you a full result of all data containing “us”.
Like “mouse, house, USA, use, louse” etc… the thing i want is only to have the data starting with “us”. So i want instead of the top filter result only “USA, use”. Its like “us*” and not as normally “us”.

Is that possible? If yes, how? The Documentation and searching in forum didn’t really help me.

Greetings.

You can use something like next

grid.attachEvent("onFilterStart", function(indexes, values){ if (values[0] != ""){ mask = new RegExp("^"+values[0],"gi"); values[0]=function(check){ return mask.test(check); } } return true; })

Above code will intercept filtering attempt and will replace static column value with custom filtering logic.

Hi

this is working but i have problem.
I have 3 record in the grid.
IN
ID
IS

When I type the first letter “I” it is showing only 2 records. it is not showing all 3 records

can you tell me what is the problem and please help me solve

Thank you,

Please, try to use the #text_filter_inc in your header.