4

I want to override the _prepareCollection method but not working I am using preference to override the method, In the same class of another method except _prepareCollection is going to successfully overridden.

Please help on the above issue.Any references and suggestion is highly appreciated.

Thanks.

  • Show your code. – Sohel Rana Oct 13 '17 at 14:53
3

I have got the answer from Magento core module.

We can override by the following code

Replace

//return parent::_prepareColumns();

To

return \Magento\Backend\Block\Widget\Grid\Extended::_prepareCollection();

It's work for me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.