I added product name column in my module ui grid. In my database, it's save product id.
I display successfully product name in column by product id. But, filter not working when I search by product name.
I just want to add custom field in collection when I do filter.
Current grid collection array :
Array
(
[0] => Array
(
[id] => 1
[rule_title] => {"1":"Rule 1","2":"Rule 1"}
[status] => 1
)
[1] => Array
(
[id] => 2
[rule_title] => {"1":"Rule 2","2":"Rule 2"}
[status] => 1
)
)
Want array like this :
Array
(
[0] => Array
(
[id] => 1
[rule_title] => {"1":"Rule 1","2":"Rule 1"}
[status] => 1
[rule_name] => Rule 1
)
[1] => Array
(
[id] => 2
[rule_title] => {"1":"Rule 2","2":"Rule 2"}
[status] => 1
[rule_name] => Rule 2
)
)
How to do that?