Proplem with filter


Here my data.

id SubCat Category_id
1 subcat1 1
2 subcat2 5
3 subcat3 6
4 subcat4 8
5 subcat5 12
6 subcat6 13
7 subcat7 14
8 subcat8 22
9 subcat9 31
10 subcat10 45

When I filtering SubCategory grid mygrid.filterBy(1,id). If id was 1 it’s showing me


I think filter works “category_id like 1”

I need filter “where category_id = 1”

please help me what could i do?

Yes, by default filterBy() method works as “category_id like 1”.

As a workaround you can use 2nd parameter of filterBy() method as a function and create any custom filter you need … t_filterby

If possible please help me on this.

I do not know what would be in the function body.

I will very thank you if you show me this function is works as “where category_id = 1”

Thank you again!

Warm regards,