Skip to main content
Share Your Experience: Take the 2024 Developer Survey
14 votes
Accepted

Magento 2 : add pager in custom grid at frontend

To fulfil the requirement, we have gone through many approaches and found the best solution for pagination on Magento2 custom collection. Here we are going to explain the best approach please follow ...
Manish's user avatar
  • 3,116
6 votes
Accepted

Magento 2 Get admin user collection with specific role name

I got the solution as below: use Magento\User\Model\ResourceModel\User\CollectionFactory as UserCollectionFactory; /** * @var \Arrow\Customerassignment\Model\userFactory */ ...
Utsav Gupta's user avatar
  • 1,243
3 votes
Accepted

can anyone have idea that how to create edit action for ui component based custom grid in magento 2?

Add the following code in your mageplaza_helloworld_post_listing.xml file <columns> ... ... <actionsColumn class="Mageplaza\HelloWorld\Ui\Component\Listing\Column\Actions" name="actions"> ...
Dinesh Yadav's user avatar
  • 6,457
2 votes

I want to remove duplicate entry from admin grid in Magento 2

You have to apply below function to your datasource grid collection. <?php protected function _initSelect() { parent::_initSelect(); $tableName = $this->getTable('yout_table_name'); ...
Yash Shah's user avatar
  • 2,503
2 votes

I want to remove duplicate entry from admin grid in Magento 2

You need to apply your custom class(Namespace\Modulename\Ui\Component\Listing\Columns\Date) instead of default magento class (Magento\Ui\Component\Listing\Columns\Date). Now create above given class ...
Chirag Patel's user avatar
  • 6,136
2 votes
Accepted

How can we add custom grid at customer group edit form inside a fieldset?

After adding preference for the class <preference for="Magento\Customer\Block\Adminhtml\Group\Edit\Form" type="Vendor\Module\Block\Adminhtml\PathToFile" /> Add below code in ...
Abdul Samad Abbasi's user avatar
2 votes

How can we add custom grid at customer group edit form inside a fieldset?

In order to add custom grid in customer group edit form you need to override the controller and custom block to render grid in it. Create custom module for it Vendor/Module/etc/di.xml <?xml ...
Rahul Barot's user avatar
  • 1,122
2 votes
Accepted

Magento 2: Display Image in exported excel file from custom grid

Finally, I got the image in my exported Excel file. Here is my exportExcel.php (Controller) code: <?php namespace Vendorname\Modulename\Controller\Adminhtml\Report; use Magento\Framework\App\...
Faisal Sheikh's user avatar
1 vote

Magento 2: Display Image in exported excel file from custom grid

I think you need to override vendor/magento/module-backend/Block/Widget/Grid/Export.php this File and check getExcelFile function And also see this exmple for adding image in Excel File Adding ...
Ronak Rathod's user avatar
  • 6,332
1 vote
Accepted

Filter in custom grid doesn't work normally. Magento2

Try to replace data source section to: <dataSource name="grid_record_grid_list_data_source"> <argument name="dataProvider" xsi:type="configurableObject"> <argument ...
sergei.sss's user avatar
  • 1,179
1 vote

custom grid filter doesn't work when filtering products by category (bl_customgride module)

I found a solution on this post. Fixing Magento Invalid attribute name issue after SUPEE-11219
anass hl's user avatar
1 vote

How can I get my custom news collection on frontend in magento 1.9?

Call below code instead Remove: <?php $newsCollection = $this->getNewsCollection(); ?> Replace : <?php $newsCollection = $this->_getNewsCollection(); ?>
Padhiyar Gaurang's user avatar
1 vote
Accepted

How to remove "Select Visible", "Unselect Visible" and Next Page buttons from grid

To remove Pager use this code at grid.php: public function __construct() { parent::__construct(); $this->setSaveParametersInSession(true); $this->setPagerVisibility(false); $...
Padhiyar Gaurang's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible