Status not shown label in admin grid in magento 2How to display Yes/No values in admin grid (Magento2)?How can i rewrite TierPrice Block in Magento2Update Const template at Magento 2 ClassMagento model extension experiment, return: “class does not exist”How to add filtering to custom table field column in Customers admin grid in Magento2?main.CRITICAL: Plugin class doesn't existMagento 2: How to override newsletter Subscriber modelMagento 2.1 Create a filter in the product grid by new attributeMagento 2 Add new field to Magento_User admin formMagento offline custom Payment method with drop down listMagento 2.3 Can't view module's front end page output?
Is there a hemisphere-neutral way of specifying a season?
Why is the 'in' operator throwing an error with a string literal instead of logging false?
Anagram holiday
Did Shadowfax go to Valinor?
Why "Having chlorophyll without photosynthesis is actually very dangerous" and "like living with a bomb"?
What is the most common color to indicate the input-field is disabled?
Assassin's bullet with mercury
Can a rocket refuel on Mars from water?
Can I ask the recruiters in my resume to put the reason why I am rejected?
Why does Arabsat 6A need a Falcon Heavy to launch
How to take photos in burst mode, without vibration?
What do you call someone who asks many questions?
Doing something right before you need it - expression for this?
When a company launches a new product do they "come out" with a new product or do they "come up" with a new product?
Why are electrically insulating heatsinks so rare? Is it just cost?
Why is it a bad idea to hire a hitman to eliminate most corrupt politicians?
Western buddy movie with a supernatural twist where a woman turns into an eagle at the end
What is going on with Captain Marvel's blood colour?
How do I write bicross product symbols in latex?
How much of data wrangling is a data scientist's job?
Stopping power of mountain vs road bike
Is it unprofessional to ask if a job posting on GlassDoor is real?
Why can't we play rap on piano?
Do I have a twin with permutated remainders?
Status not shown label in admin grid in magento 2
How to display Yes/No values in admin grid (Magento2)?How can i rewrite TierPrice Block in Magento2Update Const template at Magento 2 ClassMagento model extension experiment, return: “class does not exist”How to add filtering to custom table field column in Customers admin grid in Magento2?main.CRITICAL: Plugin class doesn't existMagento 2: How to override newsletter Subscriber modelMagento 2.1 Create a filter in the product grid by new attributeMagento 2 Add new field to Magento_User admin formMagento offline custom Payment method with drop down listMagento 2.3 Can't view module's front end page output?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
shippingbar_post_listing.xml
<column name="status">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">CMShippingbarModelStatus</item>
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="editor" xsi:type="array">
<item name="editorType" xsi:type="string">text</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
</item>
<item name="label" xsi:type="string" translate="true">Status</item>
</item>
</argument>
</column>
CMShippingbarModelStatus.php
<?php
namespace CMShippingbarModel;
use MagentoFrameworkDataOptionSourceInterface;
/**
* ProductStatus Class
*/
class Status implements OptionSourceInterface
/**
* @var CMShippingbarModelProductlabel
*/
protected $model;
/**
* Constructor
*
* @param CMShippingbarModelModelFile $model
*/
protected function _construct(CMShippingbarModelShippingbar $model)
$this->model = $model;
/**
* Get options
*
* @return array
*/
public function toOptionArray()
$options[] = ['label' => '', 'value' => ''];
$availableOptions =$this->model->getAvailableStatuses();
foreach ($availableOptions as $key => $value)
$options[] = [
'label' => $value,
'value' => $key,
];
return $options;
CMShippingbarModelShippingbar.php
<?php
namespace CMShippingbarModel;
class Shippingbar extends MagentoFrameworkModelAbstractModel
const STATUS_ENABLED = 1;
const STATUS_DISABLED = 0;
protected function _construct()
$this->_init('CMShippingbarModelResourceModelShippingbar');
public function getAvailableStatuses()
return [self::STATUS_ENABLED => __('Enabled'), self::STATUS_DISABLED => __('Disabled')];
magento2 uicomponent
add a comment |
shippingbar_post_listing.xml
<column name="status">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">CMShippingbarModelStatus</item>
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="editor" xsi:type="array">
<item name="editorType" xsi:type="string">text</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
</item>
<item name="label" xsi:type="string" translate="true">Status</item>
</item>
</argument>
</column>
CMShippingbarModelStatus.php
<?php
namespace CMShippingbarModel;
use MagentoFrameworkDataOptionSourceInterface;
/**
* ProductStatus Class
*/
class Status implements OptionSourceInterface
/**
* @var CMShippingbarModelProductlabel
*/
protected $model;
/**
* Constructor
*
* @param CMShippingbarModelModelFile $model
*/
protected function _construct(CMShippingbarModelShippingbar $model)
$this->model = $model;
/**
* Get options
*
* @return array
*/
public function toOptionArray()
$options[] = ['label' => '', 'value' => ''];
$availableOptions =$this->model->getAvailableStatuses();
foreach ($availableOptions as $key => $value)
$options[] = [
'label' => $value,
'value' => $key,
];
return $options;
CMShippingbarModelShippingbar.php
<?php
namespace CMShippingbarModel;
class Shippingbar extends MagentoFrameworkModelAbstractModel
const STATUS_ENABLED = 1;
const STATUS_DISABLED = 0;
protected function _construct()
$this->_init('CMShippingbarModelResourceModelShippingbar');
public function getAvailableStatuses()
return [self::STATUS_ENABLED => __('Enabled'), self::STATUS_DISABLED => __('Disabled')];
magento2 uicomponent
add a comment |
shippingbar_post_listing.xml
<column name="status">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">CMShippingbarModelStatus</item>
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="editor" xsi:type="array">
<item name="editorType" xsi:type="string">text</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
</item>
<item name="label" xsi:type="string" translate="true">Status</item>
</item>
</argument>
</column>
CMShippingbarModelStatus.php
<?php
namespace CMShippingbarModel;
use MagentoFrameworkDataOptionSourceInterface;
/**
* ProductStatus Class
*/
class Status implements OptionSourceInterface
/**
* @var CMShippingbarModelProductlabel
*/
protected $model;
/**
* Constructor
*
* @param CMShippingbarModelModelFile $model
*/
protected function _construct(CMShippingbarModelShippingbar $model)
$this->model = $model;
/**
* Get options
*
* @return array
*/
public function toOptionArray()
$options[] = ['label' => '', 'value' => ''];
$availableOptions =$this->model->getAvailableStatuses();
foreach ($availableOptions as $key => $value)
$options[] = [
'label' => $value,
'value' => $key,
];
return $options;
CMShippingbarModelShippingbar.php
<?php
namespace CMShippingbarModel;
class Shippingbar extends MagentoFrameworkModelAbstractModel
const STATUS_ENABLED = 1;
const STATUS_DISABLED = 0;
protected function _construct()
$this->_init('CMShippingbarModelResourceModelShippingbar');
public function getAvailableStatuses()
return [self::STATUS_ENABLED => __('Enabled'), self::STATUS_DISABLED => __('Disabled')];
magento2 uicomponent
shippingbar_post_listing.xml
<column name="status">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">CMShippingbarModelStatus</item>
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="editor" xsi:type="array">
<item name="editorType" xsi:type="string">text</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
</item>
<item name="label" xsi:type="string" translate="true">Status</item>
</item>
</argument>
</column>
CMShippingbarModelStatus.php
<?php
namespace CMShippingbarModel;
use MagentoFrameworkDataOptionSourceInterface;
/**
* ProductStatus Class
*/
class Status implements OptionSourceInterface
/**
* @var CMShippingbarModelProductlabel
*/
protected $model;
/**
* Constructor
*
* @param CMShippingbarModelModelFile $model
*/
protected function _construct(CMShippingbarModelShippingbar $model)
$this->model = $model;
/**
* Get options
*
* @return array
*/
public function toOptionArray()
$options[] = ['label' => '', 'value' => ''];
$availableOptions =$this->model->getAvailableStatuses();
foreach ($availableOptions as $key => $value)
$options[] = [
'label' => $value,
'value' => $key,
];
return $options;
CMShippingbarModelShippingbar.php
<?php
namespace CMShippingbarModel;
class Shippingbar extends MagentoFrameworkModelAbstractModel
const STATUS_ENABLED = 1;
const STATUS_DISABLED = 0;
protected function _construct()
$this->_init('CMShippingbarModelResourceModelShippingbar');
public function getAvailableStatuses()
return [self::STATUS_ENABLED => __('Enabled'), self::STATUS_DISABLED => __('Disabled')];
magento2 uicomponent
magento2 uicomponent
edited 2 days ago
Ghulam.M
29511
29511
asked 2 days ago
divya sekardivya sekar
35314
35314
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
In shippingbar_post_listing.xml file.
<column name="status">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">CMShippingbarUiComponentListingColumnStatus</item><item name="config" xsi:type="array">
<item name="sortOrder" xsi:type="number">60</item>
<item name="filter" xsi:type="string">select</item> <item name="label" translate="true" xsi:type="string">Status</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
<item name="dataType" xsi:type="string">select</item>
<item name="editor" xsi:type="array">
<item name="editorType" xsi:type="string">select</item>
</item>
</item>
</argument>
</column>
CMShippingbarUiComponentListingColumnStatus.php
<?php
namespace CMShippingbarUiComponentListingColumn;
class Status implements MagentoFrameworkOptionArrayInterface
/**
* Options getter
*
* @return array
*/
public function toOptionArray()
return [['value' => 1, 'label' => __('Enable')], ['value' => 0, 'label' => __('Disable')]];
I hope it helps!
Error comes : ( ! ) Fatal error: Uncaught Error: Call to a member function getAvailableStatuses() on null in
– divya sekar
2 days ago
Have you addgetAvailableStatuses()
in your model file?
– Chirag Patel
2 days ago
s i added in my model file
– divya sekar
2 days ago
can you share your updated code in your question?
– Chirag Patel
2 days ago
1
You can try with this magento.stackexchange.com/questions/217444/… It might work for you.
– Chirag Patel
2 days ago
|
show 15 more comments
try this way...
and shippingbar_post_listing.xml in my code replace
<column name="status">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">CMShippingbarUiComponentListingColumnStatus</item><item name="config" xsi:type="array">
<item name="sortOrder" xsi:type="number">60</item>
<item name="filter" xsi:type="string">select</item> <item name="label" translate="true" xsi:type="string">Status</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
<item name="dataType" xsi:type="string">select</item>
<item name="editor" xsi:type="array">
<item name="editorType" xsi:type="string">select</item>
</item>
</item>
</argument>
</column>
and CMShippingbarUiComponentListingColumnStatus.php code this way..
<?php
namespace CMShippingbarUiComponentListingColumn;
class Status implements MagentoFrameworkOptionArrayInterface
/**
* Options getter
*
* @return array
*/
public function toOptionArray()
return [['value' => 1, 'label' => __('Enable')], ['value' => 0, 'label' => __('Disable')]];
In which file @rakesh
– divya sekar
2 days ago
its not working rakesh
– divya sekar
2 days ago
you have my code use and replace it?
– Rakesh Donga
2 days ago
S I did it, its again show status '0' or '1'
– divya sekar
2 days ago
prnt.sc/n6dyv9 i used it but it replicate same prnt.sc/n6dzm6
– divya sekar
2 days ago
|
show 6 more comments
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%2f268336%2fstatus-not-shown-label-in-admin-grid-in-magento-2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
In shippingbar_post_listing.xml file.
<column name="status">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">CMShippingbarUiComponentListingColumnStatus</item><item name="config" xsi:type="array">
<item name="sortOrder" xsi:type="number">60</item>
<item name="filter" xsi:type="string">select</item> <item name="label" translate="true" xsi:type="string">Status</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
<item name="dataType" xsi:type="string">select</item>
<item name="editor" xsi:type="array">
<item name="editorType" xsi:type="string">select</item>
</item>
</item>
</argument>
</column>
CMShippingbarUiComponentListingColumnStatus.php
<?php
namespace CMShippingbarUiComponentListingColumn;
class Status implements MagentoFrameworkOptionArrayInterface
/**
* Options getter
*
* @return array
*/
public function toOptionArray()
return [['value' => 1, 'label' => __('Enable')], ['value' => 0, 'label' => __('Disable')]];
I hope it helps!
Error comes : ( ! ) Fatal error: Uncaught Error: Call to a member function getAvailableStatuses() on null in
– divya sekar
2 days ago
Have you addgetAvailableStatuses()
in your model file?
– Chirag Patel
2 days ago
s i added in my model file
– divya sekar
2 days ago
can you share your updated code in your question?
– Chirag Patel
2 days ago
1
You can try with this magento.stackexchange.com/questions/217444/… It might work for you.
– Chirag Patel
2 days ago
|
show 15 more comments
In shippingbar_post_listing.xml file.
<column name="status">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">CMShippingbarUiComponentListingColumnStatus</item><item name="config" xsi:type="array">
<item name="sortOrder" xsi:type="number">60</item>
<item name="filter" xsi:type="string">select</item> <item name="label" translate="true" xsi:type="string">Status</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
<item name="dataType" xsi:type="string">select</item>
<item name="editor" xsi:type="array">
<item name="editorType" xsi:type="string">select</item>
</item>
</item>
</argument>
</column>
CMShippingbarUiComponentListingColumnStatus.php
<?php
namespace CMShippingbarUiComponentListingColumn;
class Status implements MagentoFrameworkOptionArrayInterface
/**
* Options getter
*
* @return array
*/
public function toOptionArray()
return [['value' => 1, 'label' => __('Enable')], ['value' => 0, 'label' => __('Disable')]];
I hope it helps!
Error comes : ( ! ) Fatal error: Uncaught Error: Call to a member function getAvailableStatuses() on null in
– divya sekar
2 days ago
Have you addgetAvailableStatuses()
in your model file?
– Chirag Patel
2 days ago
s i added in my model file
– divya sekar
2 days ago
can you share your updated code in your question?
– Chirag Patel
2 days ago
1
You can try with this magento.stackexchange.com/questions/217444/… It might work for you.
– Chirag Patel
2 days ago
|
show 15 more comments
In shippingbar_post_listing.xml file.
<column name="status">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">CMShippingbarUiComponentListingColumnStatus</item><item name="config" xsi:type="array">
<item name="sortOrder" xsi:type="number">60</item>
<item name="filter" xsi:type="string">select</item> <item name="label" translate="true" xsi:type="string">Status</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
<item name="dataType" xsi:type="string">select</item>
<item name="editor" xsi:type="array">
<item name="editorType" xsi:type="string">select</item>
</item>
</item>
</argument>
</column>
CMShippingbarUiComponentListingColumnStatus.php
<?php
namespace CMShippingbarUiComponentListingColumn;
class Status implements MagentoFrameworkOptionArrayInterface
/**
* Options getter
*
* @return array
*/
public function toOptionArray()
return [['value' => 1, 'label' => __('Enable')], ['value' => 0, 'label' => __('Disable')]];
I hope it helps!
In shippingbar_post_listing.xml file.
<column name="status">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">CMShippingbarUiComponentListingColumnStatus</item><item name="config" xsi:type="array">
<item name="sortOrder" xsi:type="number">60</item>
<item name="filter" xsi:type="string">select</item> <item name="label" translate="true" xsi:type="string">Status</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
<item name="dataType" xsi:type="string">select</item>
<item name="editor" xsi:type="array">
<item name="editorType" xsi:type="string">select</item>
</item>
</item>
</argument>
</column>
CMShippingbarUiComponentListingColumnStatus.php
<?php
namespace CMShippingbarUiComponentListingColumn;
class Status implements MagentoFrameworkOptionArrayInterface
/**
* Options getter
*
* @return array
*/
public function toOptionArray()
return [['value' => 1, 'label' => __('Enable')], ['value' => 0, 'label' => __('Disable')]];
I hope it helps!
edited 2 days ago
answered 2 days ago
Chirag PatelChirag Patel
2,468423
2,468423
Error comes : ( ! ) Fatal error: Uncaught Error: Call to a member function getAvailableStatuses() on null in
– divya sekar
2 days ago
Have you addgetAvailableStatuses()
in your model file?
– Chirag Patel
2 days ago
s i added in my model file
– divya sekar
2 days ago
can you share your updated code in your question?
– Chirag Patel
2 days ago
1
You can try with this magento.stackexchange.com/questions/217444/… It might work for you.
– Chirag Patel
2 days ago
|
show 15 more comments
Error comes : ( ! ) Fatal error: Uncaught Error: Call to a member function getAvailableStatuses() on null in
– divya sekar
2 days ago
Have you addgetAvailableStatuses()
in your model file?
– Chirag Patel
2 days ago
s i added in my model file
– divya sekar
2 days ago
can you share your updated code in your question?
– Chirag Patel
2 days ago
1
You can try with this magento.stackexchange.com/questions/217444/… It might work for you.
– Chirag Patel
2 days ago
Error comes : ( ! ) Fatal error: Uncaught Error: Call to a member function getAvailableStatuses() on null in
– divya sekar
2 days ago
Error comes : ( ! ) Fatal error: Uncaught Error: Call to a member function getAvailableStatuses() on null in
– divya sekar
2 days ago
Have you add
getAvailableStatuses()
in your model file?– Chirag Patel
2 days ago
Have you add
getAvailableStatuses()
in your model file?– Chirag Patel
2 days ago
s i added in my model file
– divya sekar
2 days ago
s i added in my model file
– divya sekar
2 days ago
can you share your updated code in your question?
– Chirag Patel
2 days ago
can you share your updated code in your question?
– Chirag Patel
2 days ago
1
1
You can try with this magento.stackexchange.com/questions/217444/… It might work for you.
– Chirag Patel
2 days ago
You can try with this magento.stackexchange.com/questions/217444/… It might work for you.
– Chirag Patel
2 days ago
|
show 15 more comments
try this way...
and shippingbar_post_listing.xml in my code replace
<column name="status">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">CMShippingbarUiComponentListingColumnStatus</item><item name="config" xsi:type="array">
<item name="sortOrder" xsi:type="number">60</item>
<item name="filter" xsi:type="string">select</item> <item name="label" translate="true" xsi:type="string">Status</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
<item name="dataType" xsi:type="string">select</item>
<item name="editor" xsi:type="array">
<item name="editorType" xsi:type="string">select</item>
</item>
</item>
</argument>
</column>
and CMShippingbarUiComponentListingColumnStatus.php code this way..
<?php
namespace CMShippingbarUiComponentListingColumn;
class Status implements MagentoFrameworkOptionArrayInterface
/**
* Options getter
*
* @return array
*/
public function toOptionArray()
return [['value' => 1, 'label' => __('Enable')], ['value' => 0, 'label' => __('Disable')]];
In which file @rakesh
– divya sekar
2 days ago
its not working rakesh
– divya sekar
2 days ago
you have my code use and replace it?
– Rakesh Donga
2 days ago
S I did it, its again show status '0' or '1'
– divya sekar
2 days ago
prnt.sc/n6dyv9 i used it but it replicate same prnt.sc/n6dzm6
– divya sekar
2 days ago
|
show 6 more comments
try this way...
and shippingbar_post_listing.xml in my code replace
<column name="status">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">CMShippingbarUiComponentListingColumnStatus</item><item name="config" xsi:type="array">
<item name="sortOrder" xsi:type="number">60</item>
<item name="filter" xsi:type="string">select</item> <item name="label" translate="true" xsi:type="string">Status</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
<item name="dataType" xsi:type="string">select</item>
<item name="editor" xsi:type="array">
<item name="editorType" xsi:type="string">select</item>
</item>
</item>
</argument>
</column>
and CMShippingbarUiComponentListingColumnStatus.php code this way..
<?php
namespace CMShippingbarUiComponentListingColumn;
class Status implements MagentoFrameworkOptionArrayInterface
/**
* Options getter
*
* @return array
*/
public function toOptionArray()
return [['value' => 1, 'label' => __('Enable')], ['value' => 0, 'label' => __('Disable')]];
In which file @rakesh
– divya sekar
2 days ago
its not working rakesh
– divya sekar
2 days ago
you have my code use and replace it?
– Rakesh Donga
2 days ago
S I did it, its again show status '0' or '1'
– divya sekar
2 days ago
prnt.sc/n6dyv9 i used it but it replicate same prnt.sc/n6dzm6
– divya sekar
2 days ago
|
show 6 more comments
try this way...
and shippingbar_post_listing.xml in my code replace
<column name="status">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">CMShippingbarUiComponentListingColumnStatus</item><item name="config" xsi:type="array">
<item name="sortOrder" xsi:type="number">60</item>
<item name="filter" xsi:type="string">select</item> <item name="label" translate="true" xsi:type="string">Status</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
<item name="dataType" xsi:type="string">select</item>
<item name="editor" xsi:type="array">
<item name="editorType" xsi:type="string">select</item>
</item>
</item>
</argument>
</column>
and CMShippingbarUiComponentListingColumnStatus.php code this way..
<?php
namespace CMShippingbarUiComponentListingColumn;
class Status implements MagentoFrameworkOptionArrayInterface
/**
* Options getter
*
* @return array
*/
public function toOptionArray()
return [['value' => 1, 'label' => __('Enable')], ['value' => 0, 'label' => __('Disable')]];
try this way...
and shippingbar_post_listing.xml in my code replace
<column name="status">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">CMShippingbarUiComponentListingColumnStatus</item><item name="config" xsi:type="array">
<item name="sortOrder" xsi:type="number">60</item>
<item name="filter" xsi:type="string">select</item> <item name="label" translate="true" xsi:type="string">Status</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
<item name="dataType" xsi:type="string">select</item>
<item name="editor" xsi:type="array">
<item name="editorType" xsi:type="string">select</item>
</item>
</item>
</argument>
</column>
and CMShippingbarUiComponentListingColumnStatus.php code this way..
<?php
namespace CMShippingbarUiComponentListingColumn;
class Status implements MagentoFrameworkOptionArrayInterface
/**
* Options getter
*
* @return array
*/
public function toOptionArray()
return [['value' => 1, 'label' => __('Enable')], ['value' => 0, 'label' => __('Disable')]];
edited yesterday
divya sekar
35314
35314
answered 2 days ago
Rakesh DongaRakesh Donga
2,393316
2,393316
In which file @rakesh
– divya sekar
2 days ago
its not working rakesh
– divya sekar
2 days ago
you have my code use and replace it?
– Rakesh Donga
2 days ago
S I did it, its again show status '0' or '1'
– divya sekar
2 days ago
prnt.sc/n6dyv9 i used it but it replicate same prnt.sc/n6dzm6
– divya sekar
2 days ago
|
show 6 more comments
In which file @rakesh
– divya sekar
2 days ago
its not working rakesh
– divya sekar
2 days ago
you have my code use and replace it?
– Rakesh Donga
2 days ago
S I did it, its again show status '0' or '1'
– divya sekar
2 days ago
prnt.sc/n6dyv9 i used it but it replicate same prnt.sc/n6dzm6
– divya sekar
2 days ago
In which file @rakesh
– divya sekar
2 days ago
In which file @rakesh
– divya sekar
2 days ago
its not working rakesh
– divya sekar
2 days ago
its not working rakesh
– divya sekar
2 days ago
you have my code use and replace it?
– Rakesh Donga
2 days ago
you have my code use and replace it?
– Rakesh Donga
2 days ago
S I did it, its again show status '0' or '1'
– divya sekar
2 days ago
S I did it, its again show status '0' or '1'
– divya sekar
2 days ago
prnt.sc/n6dyv9 i used it but it replicate same prnt.sc/n6dzm6
– divya sekar
2 days ago
prnt.sc/n6dyv9 i used it but it replicate same prnt.sc/n6dzm6
– divya sekar
2 days ago
|
show 6 more comments
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%2f268336%2fstatus-not-shown-label-in-admin-grid-in-magento-2%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