Magento 2 how to override the admin user's gridAdmin product grid filtered by multi SKUsHow to create Magento editable grid?How to add export functionality in Magento 2 new grid systemDisplay an image in the admin grid in magento 2Magento 2 - change value in admin order grid columnMagento 2 : Admin grid with thumbnail fieldHow to add Upload Button for importing a csv file in the Custom Admin Grid Container in magento 2?How to show the download link in grid in backend (without ui component ) in magento 2How Override the grid customer magento 2Magento 2 - Create admin grid with two tables of different structures using UI Component

Email Account under attack (really) - anything I can do?

What are the advantages and disadvantages of running one shots compared to campaigns?

aging parents with no investments

I see my dog run

Add an angle to a sphere

Mapping arrows in commutative diagrams

Does the average primeness of natural numbers tend to zero?

Pristine Bit Checking

Is domain driven design an anti-SQL pattern?

What does "enim et" mean?

Extreme, but not acceptable situation and I can't start the work tomorrow morning

Calculate Levenshtein distance between two strings in Python

Where to refill my bottle in India?

OA final episode explanation

Could a US political party gain complete control over the government by removing checks & balances?

Deciding between multiple birth names and dates?

New order #4: World

What happens when a metallic dragon and a chromatic dragon mate?

Is this food a bread or a loaf?

What do you call something that goes against the spirit of the law, but is legal when interpreting the law to the letter?

How to manage monthly salary

Is a car considered movable or immovable property?

I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine

Is there a familial term for apples and pears?



Magento 2 how to override the admin user's grid


Admin product grid filtered by multi SKUsHow to create Magento editable grid?How to add export functionality in Magento 2 new grid systemDisplay an image in the admin grid in magento 2Magento 2 - change value in admin order grid columnMagento 2 : Admin grid with thumbnail fieldHow to add Upload Button for importing a csv file in the Custom Admin Grid Container in magento 2?How to show the download link in grid in backend (without ui component ) in magento 2How Override the grid customer magento 2Magento 2 - Create admin grid with two tables of different structures using UI Component






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I am trying to add new custom field in admin user's grid but it's not in UI components.
They are generating grid with data object in MagentoUserBlockUser. Can any one please provide the solution to override the grid










share|improve this question




























    0















    I am trying to add new custom field in admin user's grid but it's not in UI components.
    They are generating grid with data object in MagentoUserBlockUser. Can any one please provide the solution to override the grid










    share|improve this question
























      0












      0








      0








      I am trying to add new custom field in admin user's grid but it's not in UI components.
      They are generating grid with data object in MagentoUserBlockUser. Can any one please provide the solution to override the grid










      share|improve this question














      I am trying to add new custom field in admin user's grid but it's not in UI components.
      They are generating grid with data object in MagentoUserBlockUser. Can any one please provide the solution to override the grid







      magento2 grid overrides






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Oct 12 '18 at 12:00









      RameshRamesh

      497525




      497525




















          1 Answer
          1






          active

          oldest

          votes


















          0














          For adding new field in admin user grid you have to create two files as below



          1. CompanyModuleviewadminhtmllayoutadminhtml_user_grid_block.xml



          <?xml version="1.0"?>
          <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
          <body>
          <referenceBlock name="adminhtml.user.grid.container">
          <referenceBlock name="adminhtml.user.grid">
          <referenceBlock name="permission.user.grid.columnSet">
          <block class="MagentoBackendBlockWidgetGridColumn" as="store_name" after="email">
          <arguments>
          <argument name="header" xsi:type="string" translate="true">Store Name</argument>
          <argument name="type" xsi:type="string">text</argument>
          <argument name="renderer" xsi:type="string">CompanyModuleBlockWidgetGridColumnRendererStoreName</argument>
          </arguments>
          </block>
          </referenceBlock>
          </referenceBlock>
          </referenceBlock>
          </body>
          </page>


          2. CompanyModuleBlockWidgetGridColumnRendererStoreName.php



          <?php

          namespace CompanyModuleBlockWidgetGridColumnRenderer;
          use MagentoBackendBlockContext;
          use MagentoBackendBlockWidgetGridColumnRendererAbstractRenderer;
          use CompanyModuleModelVendorsFactory;

          class StoreName extends AbstractRenderer


          protected $_vendorsFactory;

          public function __construct
          (
          VendorsFactory $vendorsFactory,
          Context $context,
          array $data = []
          )

          $this->_vendorsFactory = $vendorsFactory;
          parent::__construct($context, $data);


          public function render(MagentoFrameworkDataObject $row)

          $userId = $row->getUserId();
          $vendorInfo = $this->_vendorsFactory->create()->load($userId, 'user_id');
          return !empty($vendorInfo) ? $vendorInfo->getStoreTitle() : "";







          share|improve this answer























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "479"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f246279%2fmagento-2-how-to-override-the-admin-users-grid%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            For adding new field in admin user grid you have to create two files as below



            1. CompanyModuleviewadminhtmllayoutadminhtml_user_grid_block.xml



            <?xml version="1.0"?>
            <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
            <body>
            <referenceBlock name="adminhtml.user.grid.container">
            <referenceBlock name="adminhtml.user.grid">
            <referenceBlock name="permission.user.grid.columnSet">
            <block class="MagentoBackendBlockWidgetGridColumn" as="store_name" after="email">
            <arguments>
            <argument name="header" xsi:type="string" translate="true">Store Name</argument>
            <argument name="type" xsi:type="string">text</argument>
            <argument name="renderer" xsi:type="string">CompanyModuleBlockWidgetGridColumnRendererStoreName</argument>
            </arguments>
            </block>
            </referenceBlock>
            </referenceBlock>
            </referenceBlock>
            </body>
            </page>


            2. CompanyModuleBlockWidgetGridColumnRendererStoreName.php



            <?php

            namespace CompanyModuleBlockWidgetGridColumnRenderer;
            use MagentoBackendBlockContext;
            use MagentoBackendBlockWidgetGridColumnRendererAbstractRenderer;
            use CompanyModuleModelVendorsFactory;

            class StoreName extends AbstractRenderer


            protected $_vendorsFactory;

            public function __construct
            (
            VendorsFactory $vendorsFactory,
            Context $context,
            array $data = []
            )

            $this->_vendorsFactory = $vendorsFactory;
            parent::__construct($context, $data);


            public function render(MagentoFrameworkDataObject $row)

            $userId = $row->getUserId();
            $vendorInfo = $this->_vendorsFactory->create()->load($userId, 'user_id');
            return !empty($vendorInfo) ? $vendorInfo->getStoreTitle() : "";







            share|improve this answer



























              0














              For adding new field in admin user grid you have to create two files as below



              1. CompanyModuleviewadminhtmllayoutadminhtml_user_grid_block.xml



              <?xml version="1.0"?>
              <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
              <body>
              <referenceBlock name="adminhtml.user.grid.container">
              <referenceBlock name="adminhtml.user.grid">
              <referenceBlock name="permission.user.grid.columnSet">
              <block class="MagentoBackendBlockWidgetGridColumn" as="store_name" after="email">
              <arguments>
              <argument name="header" xsi:type="string" translate="true">Store Name</argument>
              <argument name="type" xsi:type="string">text</argument>
              <argument name="renderer" xsi:type="string">CompanyModuleBlockWidgetGridColumnRendererStoreName</argument>
              </arguments>
              </block>
              </referenceBlock>
              </referenceBlock>
              </referenceBlock>
              </body>
              </page>


              2. CompanyModuleBlockWidgetGridColumnRendererStoreName.php



              <?php

              namespace CompanyModuleBlockWidgetGridColumnRenderer;
              use MagentoBackendBlockContext;
              use MagentoBackendBlockWidgetGridColumnRendererAbstractRenderer;
              use CompanyModuleModelVendorsFactory;

              class StoreName extends AbstractRenderer


              protected $_vendorsFactory;

              public function __construct
              (
              VendorsFactory $vendorsFactory,
              Context $context,
              array $data = []
              )

              $this->_vendorsFactory = $vendorsFactory;
              parent::__construct($context, $data);


              public function render(MagentoFrameworkDataObject $row)

              $userId = $row->getUserId();
              $vendorInfo = $this->_vendorsFactory->create()->load($userId, 'user_id');
              return !empty($vendorInfo) ? $vendorInfo->getStoreTitle() : "";







              share|improve this answer

























                0












                0








                0







                For adding new field in admin user grid you have to create two files as below



                1. CompanyModuleviewadminhtmllayoutadminhtml_user_grid_block.xml



                <?xml version="1.0"?>
                <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
                <body>
                <referenceBlock name="adminhtml.user.grid.container">
                <referenceBlock name="adminhtml.user.grid">
                <referenceBlock name="permission.user.grid.columnSet">
                <block class="MagentoBackendBlockWidgetGridColumn" as="store_name" after="email">
                <arguments>
                <argument name="header" xsi:type="string" translate="true">Store Name</argument>
                <argument name="type" xsi:type="string">text</argument>
                <argument name="renderer" xsi:type="string">CompanyModuleBlockWidgetGridColumnRendererStoreName</argument>
                </arguments>
                </block>
                </referenceBlock>
                </referenceBlock>
                </referenceBlock>
                </body>
                </page>


                2. CompanyModuleBlockWidgetGridColumnRendererStoreName.php



                <?php

                namespace CompanyModuleBlockWidgetGridColumnRenderer;
                use MagentoBackendBlockContext;
                use MagentoBackendBlockWidgetGridColumnRendererAbstractRenderer;
                use CompanyModuleModelVendorsFactory;

                class StoreName extends AbstractRenderer


                protected $_vendorsFactory;

                public function __construct
                (
                VendorsFactory $vendorsFactory,
                Context $context,
                array $data = []
                )

                $this->_vendorsFactory = $vendorsFactory;
                parent::__construct($context, $data);


                public function render(MagentoFrameworkDataObject $row)

                $userId = $row->getUserId();
                $vendorInfo = $this->_vendorsFactory->create()->load($userId, 'user_id');
                return !empty($vendorInfo) ? $vendorInfo->getStoreTitle() : "";







                share|improve this answer













                For adding new field in admin user grid you have to create two files as below



                1. CompanyModuleviewadminhtmllayoutadminhtml_user_grid_block.xml



                <?xml version="1.0"?>
                <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
                <body>
                <referenceBlock name="adminhtml.user.grid.container">
                <referenceBlock name="adminhtml.user.grid">
                <referenceBlock name="permission.user.grid.columnSet">
                <block class="MagentoBackendBlockWidgetGridColumn" as="store_name" after="email">
                <arguments>
                <argument name="header" xsi:type="string" translate="true">Store Name</argument>
                <argument name="type" xsi:type="string">text</argument>
                <argument name="renderer" xsi:type="string">CompanyModuleBlockWidgetGridColumnRendererStoreName</argument>
                </arguments>
                </block>
                </referenceBlock>
                </referenceBlock>
                </referenceBlock>
                </body>
                </page>


                2. CompanyModuleBlockWidgetGridColumnRendererStoreName.php



                <?php

                namespace CompanyModuleBlockWidgetGridColumnRenderer;
                use MagentoBackendBlockContext;
                use MagentoBackendBlockWidgetGridColumnRendererAbstractRenderer;
                use CompanyModuleModelVendorsFactory;

                class StoreName extends AbstractRenderer


                protected $_vendorsFactory;

                public function __construct
                (
                VendorsFactory $vendorsFactory,
                Context $context,
                array $data = []
                )

                $this->_vendorsFactory = $vendorsFactory;
                parent::__construct($context, $data);


                public function render(MagentoFrameworkDataObject $row)

                $userId = $row->getUserId();
                $vendorInfo = $this->_vendorsFactory->create()->load($userId, 'user_id');
                return !empty($vendorInfo) ? $vendorInfo->getStoreTitle() : "";








                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Apr 5 at 7:39









                user4536user4536

                5312




                5312



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Magento Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f246279%2fmagento-2-how-to-override-the-admin-users-grid%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Sum ergo cogito? 1 nng

                    三茅街道4182Guuntc Dn precexpngmageondP