Magento2 Need to filter grid when value is entered in search box, the column of the data is from another tableCustom Column Sorting in Admin Grid - Magento 2magento2 join queryAdmin Grid Pull Data From Different TableWhy isn't magento finding my adminhtml grid block?How can i rewrite TierPrice Block in Magento2Querying a table using data from another tableMagento column grid default filter valueMagento 2 Add new field to Magento_User admin formFilter collection value from another value from another indexFilter to the magento admin grid column with renderer valueUse join table to display data in admin grid column

Are gangsters hired to attack people at a train station classified as a terrorist attack?

Is there a way to factor age into the mass-luminosity relationship for stars?

Why is chess failing to attract big name sponsors?

Inverse Colombian Function

Is there a way to shorten this while condition?

Bug in Lualatex: not printing characters from calculation

Raw curve25519 public key points

Is an easily guessed plot twist a good plot twist?

Why did NASA use Imperial units?

How can I make sure my players' decisions have consequences?

Is the apartment I want to rent a scam?

Why can't a country print its own money to spend it only abroad?

What's the 1 inch size square knob sticking out of wall?

Are symplectomorphisms of Weil–Petersson symplectic form induced from surface diffeomorphisms?

Alternative methods for solving a system of one linear one non linear simultaneous equations

In a script how can I signal who's winning the argument?

The 50,000 row query limit is not actually a "per APEX call" as widely believed

Sextortion with actual password not found in leaks

Why are angular mometum and angular velocity not necessarily parallel, but linear momentum and linear velocity are always parallel?

What is the purpose of this "red room" in "Stranger Things"?

Can 々 stand for a duplicated kanji with a different reading?

What would be the side effects on the life of a person becoming indestructible?

How could an engineer advance human civilization by time traveling to the past?

Can't understand how static works exactly



Magento2 Need to filter grid when value is entered in search box, the column of the data is from another table


Custom Column Sorting in Admin Grid - Magento 2magento2 join queryAdmin Grid Pull Data From Different TableWhy isn't magento finding my adminhtml grid block?How can i rewrite TierPrice Block in Magento2Querying a table using data from another tableMagento column grid default filter valueMagento 2 Add new field to Magento_User admin formFilter collection value from another value from another indexFilter to the magento admin grid column with renderer valueUse join table to display data in admin grid column






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








1















I have added 4 columns in the grid as displayed in below screenshot.



enter image description here



For displaying for eg. Recipient Email column I added following code in XML & it's renderer PHP file. (Code is added below)



app/code/Company/Module/view/adminhtml/layout/adminhtml_giftcardaccount_block.xml



<block class="MagentoBackendBlockWidgetGridColumn">
<arguments>
<argument name="header" xsi:type="string" translate="true">Recipient Email</argument>
<argument name="index" xsi:type="string">recipient_email</argument>
<argument name="renderer" xsi:type="string">CompanyModuleBlockAdminhtmlWidgetGridColumnRendererRecipientemail</argument>
<argument name="sortable" xsi:type="boolean">false</argument>
</arguments>
</block>


app/code/Company/Module//Block/Adminhtml/Widget/Grid/Column/Renderer/Recipientemail.php



<?php
namespace CompanyModuleBlockAdminhtmlWidgetGridColumnRenderer;
class Recipientemail extends MagentoBackendBlockWidgetGridColumnRendererAbstractRenderer
{
protected $_storeManager;

public function __construct(
MagentoBackendBlockContext $context,
MagentoStoreModelStoreManagerInterface $storeManager,
MagentoSalesModelOrderItem $orderItem,
array $data = []
)
parent::__construct($context, $data);
$this->_storeManager = $storeManager;
$this->orderitem = $orderItem;



public function render(MagentoFrameworkDataObject $row)

$code = $row->getCode();
$result = array();
$salesorderitem = $this->orderitem->getCollection()
->addFieldToFilter('product_options', array('like' => '%'.$code.'%'));

if(!empty($salesorderitem))

foreach($salesorderitem as $orderdata)
$productOptions = $orderdata->getProductOptions();
$recipientemail = $productOptions['giftcard_recipient_email'];
if(!empty($recipientemail))
return $recipientemail;
else
return '-';


else
return '-';






Main table of grid is - magento_giftcardaccount



Recipientemail table is - product_options



"info_buyRequest":"uenc":"aHR0cDovLzE5Mi4xNjguMS4xODQvZGcvZHJ1bW1vbmQtZ29sZi1lLWdpZnQtY2FyZC5odG1s","product":"76450","selected_configurable_option":"","related_product":"","giftcard_amount":"5","giftcard_sender_name":"test","giftcard_sender_email":"testmscgoriteeps@gmail.com","giftcard_recipient_name":"test22","giftcard_recipient_email":"arjun.cmarix@gmail.com","giftcard_message":"test test gift","qty":"1","giftcard_sender_name":"test","giftcard_sender_email":"testmscgoriteeps@gmail.com","giftcard_recipient_name":"test22","giftcard_recipient_email":"arjun.cmarix@gmail.com","giftcard_message":"test test gift","giftcard_lifetime":null,"giftcard_is_redeemable":0,"giftcard_email_template":null,"giftcard_type":"0","email_sent":0,"giftcard_created_codes":["HQE9EMUNTA6N"]


My issue is the filter is not working. When I enter email in the search text field of grid it keeps on spinning for some time & grid is loaded as it is without filter.



It would be really appreciable if someone can guide me on how to filter this search text.










share|improve this question

















This question has an open bounty worth +50
reputation from Arjun ending ending at 2019-07-26 05:21:53Z">tomorrow.


This question has not received enough attention.
















  • how you make your grid using UI or block?

    – abdus
    Jul 15 at 6:53












  • Using block & render

    – Arjun
    Jul 15 at 6:53











  • can you please share the code of your block in which you call the collection for grid

    – abdus
    Jul 15 at 6:55












  • @abdus added code in my question

    – Arjun
    Jul 15 at 7:19

















1















I have added 4 columns in the grid as displayed in below screenshot.



enter image description here



For displaying for eg. Recipient Email column I added following code in XML & it's renderer PHP file. (Code is added below)



app/code/Company/Module/view/adminhtml/layout/adminhtml_giftcardaccount_block.xml



<block class="MagentoBackendBlockWidgetGridColumn">
<arguments>
<argument name="header" xsi:type="string" translate="true">Recipient Email</argument>
<argument name="index" xsi:type="string">recipient_email</argument>
<argument name="renderer" xsi:type="string">CompanyModuleBlockAdminhtmlWidgetGridColumnRendererRecipientemail</argument>
<argument name="sortable" xsi:type="boolean">false</argument>
</arguments>
</block>


app/code/Company/Module//Block/Adminhtml/Widget/Grid/Column/Renderer/Recipientemail.php



<?php
namespace CompanyModuleBlockAdminhtmlWidgetGridColumnRenderer;
class Recipientemail extends MagentoBackendBlockWidgetGridColumnRendererAbstractRenderer
{
protected $_storeManager;

public function __construct(
MagentoBackendBlockContext $context,
MagentoStoreModelStoreManagerInterface $storeManager,
MagentoSalesModelOrderItem $orderItem,
array $data = []
)
parent::__construct($context, $data);
$this->_storeManager = $storeManager;
$this->orderitem = $orderItem;



public function render(MagentoFrameworkDataObject $row)

$code = $row->getCode();
$result = array();
$salesorderitem = $this->orderitem->getCollection()
->addFieldToFilter('product_options', array('like' => '%'.$code.'%'));

if(!empty($salesorderitem))

foreach($salesorderitem as $orderdata)
$productOptions = $orderdata->getProductOptions();
$recipientemail = $productOptions['giftcard_recipient_email'];
if(!empty($recipientemail))
return $recipientemail;
else
return '-';


else
return '-';






Main table of grid is - magento_giftcardaccount



Recipientemail table is - product_options



"info_buyRequest":"uenc":"aHR0cDovLzE5Mi4xNjguMS4xODQvZGcvZHJ1bW1vbmQtZ29sZi1lLWdpZnQtY2FyZC5odG1s","product":"76450","selected_configurable_option":"","related_product":"","giftcard_amount":"5","giftcard_sender_name":"test","giftcard_sender_email":"testmscgoriteeps@gmail.com","giftcard_recipient_name":"test22","giftcard_recipient_email":"arjun.cmarix@gmail.com","giftcard_message":"test test gift","qty":"1","giftcard_sender_name":"test","giftcard_sender_email":"testmscgoriteeps@gmail.com","giftcard_recipient_name":"test22","giftcard_recipient_email":"arjun.cmarix@gmail.com","giftcard_message":"test test gift","giftcard_lifetime":null,"giftcard_is_redeemable":0,"giftcard_email_template":null,"giftcard_type":"0","email_sent":0,"giftcard_created_codes":["HQE9EMUNTA6N"]


My issue is the filter is not working. When I enter email in the search text field of grid it keeps on spinning for some time & grid is loaded as it is without filter.



It would be really appreciable if someone can guide me on how to filter this search text.










share|improve this question

















This question has an open bounty worth +50
reputation from Arjun ending ending at 2019-07-26 05:21:53Z">tomorrow.


This question has not received enough attention.
















  • how you make your grid using UI or block?

    – abdus
    Jul 15 at 6:53












  • Using block & render

    – Arjun
    Jul 15 at 6:53











  • can you please share the code of your block in which you call the collection for grid

    – abdus
    Jul 15 at 6:55












  • @abdus added code in my question

    – Arjun
    Jul 15 at 7:19













1












1








1








I have added 4 columns in the grid as displayed in below screenshot.



enter image description here



For displaying for eg. Recipient Email column I added following code in XML & it's renderer PHP file. (Code is added below)



app/code/Company/Module/view/adminhtml/layout/adminhtml_giftcardaccount_block.xml



<block class="MagentoBackendBlockWidgetGridColumn">
<arguments>
<argument name="header" xsi:type="string" translate="true">Recipient Email</argument>
<argument name="index" xsi:type="string">recipient_email</argument>
<argument name="renderer" xsi:type="string">CompanyModuleBlockAdminhtmlWidgetGridColumnRendererRecipientemail</argument>
<argument name="sortable" xsi:type="boolean">false</argument>
</arguments>
</block>


app/code/Company/Module//Block/Adminhtml/Widget/Grid/Column/Renderer/Recipientemail.php



<?php
namespace CompanyModuleBlockAdminhtmlWidgetGridColumnRenderer;
class Recipientemail extends MagentoBackendBlockWidgetGridColumnRendererAbstractRenderer
{
protected $_storeManager;

public function __construct(
MagentoBackendBlockContext $context,
MagentoStoreModelStoreManagerInterface $storeManager,
MagentoSalesModelOrderItem $orderItem,
array $data = []
)
parent::__construct($context, $data);
$this->_storeManager = $storeManager;
$this->orderitem = $orderItem;



public function render(MagentoFrameworkDataObject $row)

$code = $row->getCode();
$result = array();
$salesorderitem = $this->orderitem->getCollection()
->addFieldToFilter('product_options', array('like' => '%'.$code.'%'));

if(!empty($salesorderitem))

foreach($salesorderitem as $orderdata)
$productOptions = $orderdata->getProductOptions();
$recipientemail = $productOptions['giftcard_recipient_email'];
if(!empty($recipientemail))
return $recipientemail;
else
return '-';


else
return '-';






Main table of grid is - magento_giftcardaccount



Recipientemail table is - product_options



"info_buyRequest":"uenc":"aHR0cDovLzE5Mi4xNjguMS4xODQvZGcvZHJ1bW1vbmQtZ29sZi1lLWdpZnQtY2FyZC5odG1s","product":"76450","selected_configurable_option":"","related_product":"","giftcard_amount":"5","giftcard_sender_name":"test","giftcard_sender_email":"testmscgoriteeps@gmail.com","giftcard_recipient_name":"test22","giftcard_recipient_email":"arjun.cmarix@gmail.com","giftcard_message":"test test gift","qty":"1","giftcard_sender_name":"test","giftcard_sender_email":"testmscgoriteeps@gmail.com","giftcard_recipient_name":"test22","giftcard_recipient_email":"arjun.cmarix@gmail.com","giftcard_message":"test test gift","giftcard_lifetime":null,"giftcard_is_redeemable":0,"giftcard_email_template":null,"giftcard_type":"0","email_sent":0,"giftcard_created_codes":["HQE9EMUNTA6N"]


My issue is the filter is not working. When I enter email in the search text field of grid it keeps on spinning for some time & grid is loaded as it is without filter.



It would be really appreciable if someone can guide me on how to filter this search text.










share|improve this question
















I have added 4 columns in the grid as displayed in below screenshot.



enter image description here



For displaying for eg. Recipient Email column I added following code in XML & it's renderer PHP file. (Code is added below)



app/code/Company/Module/view/adminhtml/layout/adminhtml_giftcardaccount_block.xml



<block class="MagentoBackendBlockWidgetGridColumn">
<arguments>
<argument name="header" xsi:type="string" translate="true">Recipient Email</argument>
<argument name="index" xsi:type="string">recipient_email</argument>
<argument name="renderer" xsi:type="string">CompanyModuleBlockAdminhtmlWidgetGridColumnRendererRecipientemail</argument>
<argument name="sortable" xsi:type="boolean">false</argument>
</arguments>
</block>


app/code/Company/Module//Block/Adminhtml/Widget/Grid/Column/Renderer/Recipientemail.php



<?php
namespace CompanyModuleBlockAdminhtmlWidgetGridColumnRenderer;
class Recipientemail extends MagentoBackendBlockWidgetGridColumnRendererAbstractRenderer
{
protected $_storeManager;

public function __construct(
MagentoBackendBlockContext $context,
MagentoStoreModelStoreManagerInterface $storeManager,
MagentoSalesModelOrderItem $orderItem,
array $data = []
)
parent::__construct($context, $data);
$this->_storeManager = $storeManager;
$this->orderitem = $orderItem;



public function render(MagentoFrameworkDataObject $row)

$code = $row->getCode();
$result = array();
$salesorderitem = $this->orderitem->getCollection()
->addFieldToFilter('product_options', array('like' => '%'.$code.'%'));

if(!empty($salesorderitem))

foreach($salesorderitem as $orderdata)
$productOptions = $orderdata->getProductOptions();
$recipientemail = $productOptions['giftcard_recipient_email'];
if(!empty($recipientemail))
return $recipientemail;
else
return '-';


else
return '-';






Main table of grid is - magento_giftcardaccount



Recipientemail table is - product_options



"info_buyRequest":"uenc":"aHR0cDovLzE5Mi4xNjguMS4xODQvZGcvZHJ1bW1vbmQtZ29sZi1lLWdpZnQtY2FyZC5odG1s","product":"76450","selected_configurable_option":"","related_product":"","giftcard_amount":"5","giftcard_sender_name":"test","giftcard_sender_email":"testmscgoriteeps@gmail.com","giftcard_recipient_name":"test22","giftcard_recipient_email":"arjun.cmarix@gmail.com","giftcard_message":"test test gift","qty":"1","giftcard_sender_name":"test","giftcard_sender_email":"testmscgoriteeps@gmail.com","giftcard_recipient_name":"test22","giftcard_recipient_email":"arjun.cmarix@gmail.com","giftcard_message":"test test gift","giftcard_lifetime":null,"giftcard_is_redeemable":0,"giftcard_email_template":null,"giftcard_type":"0","email_sent":0,"giftcard_created_codes":["HQE9EMUNTA6N"]


My issue is the filter is not working. When I enter email in the search text field of grid it keeps on spinning for some time & grid is loaded as it is without filter.



It would be really appreciable if someone can guide me on how to filter this search text.







magento2 layout collection grid






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 19 at 5:46







Arjun

















asked Jul 15 at 6:45









ArjunArjun

1,98410 silver badges26 bronze badges




1,98410 silver badges26 bronze badges






This question has an open bounty worth +50
reputation from Arjun ending ending at 2019-07-26 05:21:53Z">tomorrow.


This question has not received enough attention.








This question has an open bounty worth +50
reputation from Arjun ending ending at 2019-07-26 05:21:53Z">tomorrow.


This question has not received enough attention.














  • how you make your grid using UI or block?

    – abdus
    Jul 15 at 6:53












  • Using block & render

    – Arjun
    Jul 15 at 6:53











  • can you please share the code of your block in which you call the collection for grid

    – abdus
    Jul 15 at 6:55












  • @abdus added code in my question

    – Arjun
    Jul 15 at 7:19

















  • how you make your grid using UI or block?

    – abdus
    Jul 15 at 6:53












  • Using block & render

    – Arjun
    Jul 15 at 6:53











  • can you please share the code of your block in which you call the collection for grid

    – abdus
    Jul 15 at 6:55












  • @abdus added code in my question

    – Arjun
    Jul 15 at 7:19
















how you make your grid using UI or block?

– abdus
Jul 15 at 6:53






how you make your grid using UI or block?

– abdus
Jul 15 at 6:53














Using block & render

– Arjun
Jul 15 at 6:53





Using block & render

– Arjun
Jul 15 at 6:53













can you please share the code of your block in which you call the collection for grid

– abdus
Jul 15 at 6:55






can you please share the code of your block in which you call the collection for grid

– abdus
Jul 15 at 6:55














@abdus added code in my question

– Arjun
Jul 15 at 7:19





@abdus added code in my question

– Arjun
Jul 15 at 7:19










3 Answers
3






active

oldest

votes


















0














You can join 2 or more table in _initSelect() function of collection class TestTestModuleModelResourceModelGiftCollection. After Joining the table you can use join tables column in your grid.



protected function _initSelect()

parent::_initSelect();

$this->getSelect()->joinLeft(['secondTable' => $this->getTable('your_table_name')], "secondTable.entity_id = main_table.entity_id ", ['secondTable.value as alies_name']);

return $this;






share|improve this answer

























  • Will this work on 'product_options' column in sales_order_item'

    – Arjun
    Jul 15 at 7:23











  • yes, you can join any table

    – user4536
    Jul 15 at 7:25











  • I have added product_options data in my question. I need to get 'giftcard_recipient_email' data

    – Arjun
    Jul 15 at 7:32











  • I want to join product_options table value with other table value

    – Arjun
    Jul 15 at 8:42











  • please update your question with all related code and clear requirement

    – user4536
    Jul 15 at 8:56


















0














You can Get Data From Multiple Tables using _initSelect Function in VendorModuleModelResourceModelGiftCollection



 protected function _initSelect()

parent::_initSelect();
$secondTable=$this->getTable('product_options');
$this->getSelect()->joinLeft(' ".$secondTable.",' ".$secondTable.".entity_id = main_table.entity_id ', [' ".$secondTable.".giftcard_recipient_email as Recipent Email]');






share|improve this answer






























    0














    You can view my friend's answer and take reference from there and apply as per your requirement..



    Custom Column Sorting in Admin Grid - Magento 2



    Feel free to comment if you face any issue.






    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%2f282053%2fmagento2-need-to-filter-grid-when-value-is-entered-in-search-box-the-column-of%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      You can join 2 or more table in _initSelect() function of collection class TestTestModuleModelResourceModelGiftCollection. After Joining the table you can use join tables column in your grid.



      protected function _initSelect()

      parent::_initSelect();

      $this->getSelect()->joinLeft(['secondTable' => $this->getTable('your_table_name')], "secondTable.entity_id = main_table.entity_id ", ['secondTable.value as alies_name']);

      return $this;






      share|improve this answer

























      • Will this work on 'product_options' column in sales_order_item'

        – Arjun
        Jul 15 at 7:23











      • yes, you can join any table

        – user4536
        Jul 15 at 7:25











      • I have added product_options data in my question. I need to get 'giftcard_recipient_email' data

        – Arjun
        Jul 15 at 7:32











      • I want to join product_options table value with other table value

        – Arjun
        Jul 15 at 8:42











      • please update your question with all related code and clear requirement

        – user4536
        Jul 15 at 8:56















      0














      You can join 2 or more table in _initSelect() function of collection class TestTestModuleModelResourceModelGiftCollection. After Joining the table you can use join tables column in your grid.



      protected function _initSelect()

      parent::_initSelect();

      $this->getSelect()->joinLeft(['secondTable' => $this->getTable('your_table_name')], "secondTable.entity_id = main_table.entity_id ", ['secondTable.value as alies_name']);

      return $this;






      share|improve this answer

























      • Will this work on 'product_options' column in sales_order_item'

        – Arjun
        Jul 15 at 7:23











      • yes, you can join any table

        – user4536
        Jul 15 at 7:25











      • I have added product_options data in my question. I need to get 'giftcard_recipient_email' data

        – Arjun
        Jul 15 at 7:32











      • I want to join product_options table value with other table value

        – Arjun
        Jul 15 at 8:42











      • please update your question with all related code and clear requirement

        – user4536
        Jul 15 at 8:56













      0












      0








      0







      You can join 2 or more table in _initSelect() function of collection class TestTestModuleModelResourceModelGiftCollection. After Joining the table you can use join tables column in your grid.



      protected function _initSelect()

      parent::_initSelect();

      $this->getSelect()->joinLeft(['secondTable' => $this->getTable('your_table_name')], "secondTable.entity_id = main_table.entity_id ", ['secondTable.value as alies_name']);

      return $this;






      share|improve this answer















      You can join 2 or more table in _initSelect() function of collection class TestTestModuleModelResourceModelGiftCollection. After Joining the table you can use join tables column in your grid.



      protected function _initSelect()

      parent::_initSelect();

      $this->getSelect()->joinLeft(['secondTable' => $this->getTable('your_table_name')], "secondTable.entity_id = main_table.entity_id ", ['secondTable.value as alies_name']);

      return $this;







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Jul 15 at 13:16









      Raj Mohan R

      1,6993 silver badges13 bronze badges




      1,6993 silver badges13 bronze badges










      answered Jul 15 at 6:58









      user4536user4536

      3631 silver badge15 bronze badges




      3631 silver badge15 bronze badges












      • Will this work on 'product_options' column in sales_order_item'

        – Arjun
        Jul 15 at 7:23











      • yes, you can join any table

        – user4536
        Jul 15 at 7:25











      • I have added product_options data in my question. I need to get 'giftcard_recipient_email' data

        – Arjun
        Jul 15 at 7:32











      • I want to join product_options table value with other table value

        – Arjun
        Jul 15 at 8:42











      • please update your question with all related code and clear requirement

        – user4536
        Jul 15 at 8:56

















      • Will this work on 'product_options' column in sales_order_item'

        – Arjun
        Jul 15 at 7:23











      • yes, you can join any table

        – user4536
        Jul 15 at 7:25











      • I have added product_options data in my question. I need to get 'giftcard_recipient_email' data

        – Arjun
        Jul 15 at 7:32











      • I want to join product_options table value with other table value

        – Arjun
        Jul 15 at 8:42











      • please update your question with all related code and clear requirement

        – user4536
        Jul 15 at 8:56
















      Will this work on 'product_options' column in sales_order_item'

      – Arjun
      Jul 15 at 7:23





      Will this work on 'product_options' column in sales_order_item'

      – Arjun
      Jul 15 at 7:23













      yes, you can join any table

      – user4536
      Jul 15 at 7:25





      yes, you can join any table

      – user4536
      Jul 15 at 7:25













      I have added product_options data in my question. I need to get 'giftcard_recipient_email' data

      – Arjun
      Jul 15 at 7:32





      I have added product_options data in my question. I need to get 'giftcard_recipient_email' data

      – Arjun
      Jul 15 at 7:32













      I want to join product_options table value with other table value

      – Arjun
      Jul 15 at 8:42





      I want to join product_options table value with other table value

      – Arjun
      Jul 15 at 8:42













      please update your question with all related code and clear requirement

      – user4536
      Jul 15 at 8:56





      please update your question with all related code and clear requirement

      – user4536
      Jul 15 at 8:56













      0














      You can Get Data From Multiple Tables using _initSelect Function in VendorModuleModelResourceModelGiftCollection



       protected function _initSelect()

      parent::_initSelect();
      $secondTable=$this->getTable('product_options');
      $this->getSelect()->joinLeft(' ".$secondTable.",' ".$secondTable.".entity_id = main_table.entity_id ', [' ".$secondTable.".giftcard_recipient_email as Recipent Email]');






      share|improve this answer



























        0














        You can Get Data From Multiple Tables using _initSelect Function in VendorModuleModelResourceModelGiftCollection



         protected function _initSelect()

        parent::_initSelect();
        $secondTable=$this->getTable('product_options');
        $this->getSelect()->joinLeft(' ".$secondTable.",' ".$secondTable.".entity_id = main_table.entity_id ', [' ".$secondTable.".giftcard_recipient_email as Recipent Email]');






        share|improve this answer

























          0












          0








          0







          You can Get Data From Multiple Tables using _initSelect Function in VendorModuleModelResourceModelGiftCollection



           protected function _initSelect()

          parent::_initSelect();
          $secondTable=$this->getTable('product_options');
          $this->getSelect()->joinLeft(' ".$secondTable.",' ".$secondTable.".entity_id = main_table.entity_id ', [' ".$secondTable.".giftcard_recipient_email as Recipent Email]');






          share|improve this answer













          You can Get Data From Multiple Tables using _initSelect Function in VendorModuleModelResourceModelGiftCollection



           protected function _initSelect()

          parent::_initSelect();
          $secondTable=$this->getTable('product_options');
          $this->getSelect()->joinLeft(' ".$secondTable.",' ".$secondTable.".entity_id = main_table.entity_id ', [' ".$secondTable.".giftcard_recipient_email as Recipent Email]');







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jul 19 at 5:38









          Waqar AliWaqar Ali

          18716 bronze badges




          18716 bronze badges





















              0














              You can view my friend's answer and take reference from there and apply as per your requirement..



              Custom Column Sorting in Admin Grid - Magento 2



              Feel free to comment if you face any issue.






              share|improve this answer



























                0














                You can view my friend's answer and take reference from there and apply as per your requirement..



                Custom Column Sorting in Admin Grid - Magento 2



                Feel free to comment if you face any issue.






                share|improve this answer

























                  0












                  0








                  0







                  You can view my friend's answer and take reference from there and apply as per your requirement..



                  Custom Column Sorting in Admin Grid - Magento 2



                  Feel free to comment if you face any issue.






                  share|improve this answer













                  You can view my friend's answer and take reference from there and apply as per your requirement..



                  Custom Column Sorting in Admin Grid - Magento 2



                  Feel free to comment if you face any issue.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 15 hours ago









                  mighty_hkmighty_hk

                  4941 silver badge11 bronze badges




                  4941 silver badge11 bronze badges



























                      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%2f282053%2fmagento2-need-to-filter-grid-when-value-is-entered-in-search-box-the-column-of%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

                      Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

                      Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                      Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form