Add column to gridview in custom extension The 2019 Stack Overflow Developer Survey Results Are InMagento2 : Display two table column values in single UI grid columnHow can i rewrite TierPrice Block in Magento2Magento2: store_id in UI Listing ComponentCustom renderered column sorting not working magento2magento2 uicomponent filter on id column on bases of text searchMagento 2:SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'entity_id' in where clause is ambiguousMagento2: New Customer grid column breaks the export functionalityAdd column in Admin custom module (to filter products results)Grid action column custom callback with multiple params in magento2How to populate data in custom filed in product edit form in Magento 2Magento 2 - Custom Customer attribute in order create select customer grid
Return to UK after being refused entry years previously
"as much details as you can remember"
Is there any way to tell whether the shot is going to hit you or not?
Why is the maximum length of OpenWrt’s root password 8 characters?
Identify boardgame from Big movie
What is the closest word meaning "respect for time / mindful"
Landlord wants to switch my lease to a "Land contract" to "get back at the city"
Have you ever entered Singapore using a different passport or name?
How are circuits which use complex ICs normally simulated?
What is the meaning of the verb "bear" in this context?
double encryption - One Time Pad
Can a flute soloist sit?
FPGA - DIY Programming
What do the Banks children have against barley water?
Building a conditional check constraint
Are there incongruent pythagorean triangles with the same perimeter and same area?
What is the meaning of Triage in Cybersec world?
How to answer pointed "are you quitting" questioning when I don't want them to suspect
Identify This Plant (Flower)
Why do UK politicians seemingly ignore opinion polls on Brexit?
What did it mean to "align" a radio?
Earliest use of the term "Galois extension"?
Loose spokes after only a few rides
Who coined the term "madman theory"?
Add column to gridview in custom extension
The 2019 Stack Overflow Developer Survey Results Are InMagento2 : Display two table column values in single UI grid columnHow can i rewrite TierPrice Block in Magento2Magento2: store_id in UI Listing ComponentCustom renderered column sorting not working magento2magento2 uicomponent filter on id column on bases of text searchMagento 2:SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'entity_id' in where clause is ambiguousMagento2: New Customer grid column breaks the export functionalityAdd column in Admin custom module (to filter products results)Grid action column custom callback with multiple params in magento2How to populate data in custom filed in product edit form in Magento 2Magento 2 - Custom Customer attribute in order create select customer grid
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have a custom extension where the admin user needs to select a customer from the drop down. The extension saves the customer ID to the database.
Currently, on the grid view, in my UI component I have the following:
<column name="customer_id">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">textRange</item>
<item name="sorting" xsi:type="string">asc</item>
<item name="label" xsi:type="string" translate="true">Customer ID</item>
</item>
</argument>
</column>
This displays the customer id as expected.
However, my question is how do actually display the customer name instead of just the ID in the grid view?
magento2 grid uicomponent grid-layout
add a comment |
I have a custom extension where the admin user needs to select a customer from the drop down. The extension saves the customer ID to the database.
Currently, on the grid view, in my UI component I have the following:
<column name="customer_id">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">textRange</item>
<item name="sorting" xsi:type="string">asc</item>
<item name="label" xsi:type="string" translate="true">Customer ID</item>
</item>
</argument>
</column>
This displays the customer id as expected.
However, my question is how do actually display the customer name instead of just the ID in the grid view?
magento2 grid uicomponent grid-layout
add a comment |
I have a custom extension where the admin user needs to select a customer from the drop down. The extension saves the customer ID to the database.
Currently, on the grid view, in my UI component I have the following:
<column name="customer_id">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">textRange</item>
<item name="sorting" xsi:type="string">asc</item>
<item name="label" xsi:type="string" translate="true">Customer ID</item>
</item>
</argument>
</column>
This displays the customer id as expected.
However, my question is how do actually display the customer name instead of just the ID in the grid view?
magento2 grid uicomponent grid-layout
I have a custom extension where the admin user needs to select a customer from the drop down. The extension saves the customer ID to the database.
Currently, on the grid view, in my UI component I have the following:
<column name="customer_id">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">textRange</item>
<item name="sorting" xsi:type="string">asc</item>
<item name="label" xsi:type="string" translate="true">Customer ID</item>
</item>
</argument>
</column>
This displays the customer id as expected.
However, my question is how do actually display the customer name instead of just the ID in the grid view?
magento2 grid uicomponent grid-layout
magento2 grid uicomponent grid-layout
asked Apr 7 at 10:39
Goose84Goose84
1,30911242
1,30911242
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You have to define your own custom class in order to get and display the firstname and the lastname of the customer in one UI column field, otherwise you can either use only one of them.
Like below code:
<column name="customer_firstname">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">textRange</item>
<item name="sorting" xsi:type="string">asc</item>
<item name="label" xsi:type="string" translate="true">Customer Firstname</item>
</item>
</argument>
</column>
How would you define my own custom class and what would be the contents?
– Goose84
Apr 7 at 10:57
You can check like this one : magento.stackexchange.com/questions/178286/…
– magefms
Apr 7 at 11:00
1
The issue with this method though I would have to do logic on each row? I was thinking if I join in the customer_entity table then the extension would be more efficient, wouldn't it?
– Goose84
Apr 7 at 11:06
yeah you are right with that I can agree.
– magefms
Apr 7 at 11:07
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f269045%2fadd-column-to-gridview-in-custom-extension%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
You have to define your own custom class in order to get and display the firstname and the lastname of the customer in one UI column field, otherwise you can either use only one of them.
Like below code:
<column name="customer_firstname">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">textRange</item>
<item name="sorting" xsi:type="string">asc</item>
<item name="label" xsi:type="string" translate="true">Customer Firstname</item>
</item>
</argument>
</column>
How would you define my own custom class and what would be the contents?
– Goose84
Apr 7 at 10:57
You can check like this one : magento.stackexchange.com/questions/178286/…
– magefms
Apr 7 at 11:00
1
The issue with this method though I would have to do logic on each row? I was thinking if I join in the customer_entity table then the extension would be more efficient, wouldn't it?
– Goose84
Apr 7 at 11:06
yeah you are right with that I can agree.
– magefms
Apr 7 at 11:07
add a comment |
You have to define your own custom class in order to get and display the firstname and the lastname of the customer in one UI column field, otherwise you can either use only one of them.
Like below code:
<column name="customer_firstname">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">textRange</item>
<item name="sorting" xsi:type="string">asc</item>
<item name="label" xsi:type="string" translate="true">Customer Firstname</item>
</item>
</argument>
</column>
How would you define my own custom class and what would be the contents?
– Goose84
Apr 7 at 10:57
You can check like this one : magento.stackexchange.com/questions/178286/…
– magefms
Apr 7 at 11:00
1
The issue with this method though I would have to do logic on each row? I was thinking if I join in the customer_entity table then the extension would be more efficient, wouldn't it?
– Goose84
Apr 7 at 11:06
yeah you are right with that I can agree.
– magefms
Apr 7 at 11:07
add a comment |
You have to define your own custom class in order to get and display the firstname and the lastname of the customer in one UI column field, otherwise you can either use only one of them.
Like below code:
<column name="customer_firstname">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">textRange</item>
<item name="sorting" xsi:type="string">asc</item>
<item name="label" xsi:type="string" translate="true">Customer Firstname</item>
</item>
</argument>
</column>
You have to define your own custom class in order to get and display the firstname and the lastname of the customer in one UI column field, otherwise you can either use only one of them.
Like below code:
<column name="customer_firstname">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">textRange</item>
<item name="sorting" xsi:type="string">asc</item>
<item name="label" xsi:type="string" translate="true">Customer Firstname</item>
</item>
</argument>
</column>
answered Apr 7 at 10:51
magefmsmagefms
2,5932526
2,5932526
How would you define my own custom class and what would be the contents?
– Goose84
Apr 7 at 10:57
You can check like this one : magento.stackexchange.com/questions/178286/…
– magefms
Apr 7 at 11:00
1
The issue with this method though I would have to do logic on each row? I was thinking if I join in the customer_entity table then the extension would be more efficient, wouldn't it?
– Goose84
Apr 7 at 11:06
yeah you are right with that I can agree.
– magefms
Apr 7 at 11:07
add a comment |
How would you define my own custom class and what would be the contents?
– Goose84
Apr 7 at 10:57
You can check like this one : magento.stackexchange.com/questions/178286/…
– magefms
Apr 7 at 11:00
1
The issue with this method though I would have to do logic on each row? I was thinking if I join in the customer_entity table then the extension would be more efficient, wouldn't it?
– Goose84
Apr 7 at 11:06
yeah you are right with that I can agree.
– magefms
Apr 7 at 11:07
How would you define my own custom class and what would be the contents?
– Goose84
Apr 7 at 10:57
How would you define my own custom class and what would be the contents?
– Goose84
Apr 7 at 10:57
You can check like this one : magento.stackexchange.com/questions/178286/…
– magefms
Apr 7 at 11:00
You can check like this one : magento.stackexchange.com/questions/178286/…
– magefms
Apr 7 at 11:00
1
1
The issue with this method though I would have to do logic on each row? I was thinking if I join in the customer_entity table then the extension would be more efficient, wouldn't it?
– Goose84
Apr 7 at 11:06
The issue with this method though I would have to do logic on each row? I was thinking if I join in the customer_entity table then the extension would be more efficient, wouldn't it?
– Goose84
Apr 7 at 11:06
yeah you are right with that I can agree.
– magefms
Apr 7 at 11:07
yeah you are right with that I can agree.
– magefms
Apr 7 at 11:07
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f269045%2fadd-column-to-gridview-in-custom-extension%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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