I am trying to filter my collection from my custom table using _initSelect
method in class Collection
in namespace Anshu\Custom\Model\ResourceModel\MyData
protected function _initSelect()
{
// code for filtering collection
}
But it is not going through this method.
Am I following the correct approach?
What can I filter my collection to show data in Grid in admin?
Best Answer
The issue was because of the type in
virtualType
tag in di.xmlChanged
to
Also Changed
class Collection extends \Anshu\Custom\Model\ResourceModel\MyData\Collection implements \Magento\Framework\Api\Search\SearchResultInterface
to