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 ...
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
*/
...
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">
...
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');
...
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 ...
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 ...
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 ...
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\...
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 ...
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 ...
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
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(); ?>
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);
$...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
custom-grid × 26magento2 × 14
admin × 6
magento-1.9 × 5
grid × 5
uicomponent × 5
module × 3
filter × 3
adminhtml × 2
sales-order × 2
custom-admin-grid × 2
magento-2.1 × 1
product × 1
php × 1
magento-1.8 × 1
orders × 1
collection × 1
knockoutjs × 1
admin-panel × 1
magento2.2.6 × 1
magento2.3.4 × 1
importexport × 1
magento2.2.3 × 1
customer-group × 1
best-practice × 1