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?
How does a dynamic QR code work?
OP Amp not amplifying audio signal
Do creatures with a listed speed of "0 ft., fly 30 ft. (hover)" ever touch the ground?
Was the Stack Exchange "Happy April Fools" page fitting with the '90's code?
How do I exit BASH while loop using modulus operator?
Is there an expression that means doing something right before you will need it rather than doing it in case you might need it?
What is the fastest integer factorization to break RSA?
What is the opposite of "eschatology"?
how do we prove that a sum of two periods is still a period?
Why didn't Boeing produce its own regional jet?
Why was the shrink from 8″ made only to 5.25″ and not smaller (4″ or less)
Bullying boss launched a smear campaign and made me unemployable
How to find if SQL server backup is encrypted with TDE without restoring the backup
How obscure is the use of 令 in 令和?
How can saying a song's name be a copyright violation?
Does the Cone of Cold spell freeze water?
My ex-girlfriend uses my Apple ID to log in to her iPad. Do I have to give her my Apple ID password to reset it?
Is it inappropriate for a student to attend their mentor's dissertation defense?
Processor speed limited at 0.4 Ghz
Using "tail" to follow a file without displaying the most recent lines
Getting extremely large arrows with tikzcd
In the UK, is it possible to get a referendum by a court decision?
What historical events would have to change in order to make 19th century "steampunk" technology possible?
How can a day be of 24 hours?
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?
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 11 hours ago
Ghulam.M
18011
18011
asked 18 hours ago
divya sekardivya sekar
35114
35114
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
17 hours ago
Have you addgetAvailableStatuses()
in your model file?
– Chirag Patel
17 hours ago
s i added in my model file
– divya sekar
17 hours ago
can you share your updated code in your question?
– Chirag Patel
17 hours ago
1
You can try with this magento.stackexchange.com/questions/217444/… It might work for you.
– Chirag Patel
16 hours 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">CMShippingbarModelStatus</item>
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Status</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>
</argument>
</column>
and CMShippingbarModelStatus.php code this way..
<?php
namespace CMShippingbarModel;
use MagentoFrameworkDataOptionSourceInterface;
/**
* ProductStatus Class
*/
class Status implements OptionSourceInterface
/**
* Get options
*
* @return array
*/
public function toOptionArray()
return [['value' => 1, 'label' => __('Enable')], ['value' => 0, 'label' => __('Disable')]];
In which file @rakesh
– divya sekar
18 hours ago
its not working rakesh
– divya sekar
17 hours ago
you have my code use and replace it?
– Rakesh Donga
17 hours ago
S I did it, its again show status '0' or '1'
– divya sekar
17 hours ago
prnt.sc/n6dyv9 i used it but it replicate same prnt.sc/n6dzm6
– divya sekar
17 hours ago
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%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
17 hours ago
Have you addgetAvailableStatuses()
in your model file?
– Chirag Patel
17 hours ago
s i added in my model file
– divya sekar
17 hours ago
can you share your updated code in your question?
– Chirag Patel
17 hours ago
1
You can try with this magento.stackexchange.com/questions/217444/… It might work for you.
– Chirag Patel
16 hours 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
17 hours ago
Have you addgetAvailableStatuses()
in your model file?
– Chirag Patel
17 hours ago
s i added in my model file
– divya sekar
17 hours ago
can you share your updated code in your question?
– Chirag Patel
17 hours ago
1
You can try with this magento.stackexchange.com/questions/217444/… It might work for you.
– Chirag Patel
16 hours 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 16 hours ago
answered 18 hours 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
17 hours ago
Have you addgetAvailableStatuses()
in your model file?
– Chirag Patel
17 hours ago
s i added in my model file
– divya sekar
17 hours ago
can you share your updated code in your question?
– Chirag Patel
17 hours ago
1
You can try with this magento.stackexchange.com/questions/217444/… It might work for you.
– Chirag Patel
16 hours ago
|
show 15 more comments
Error comes : ( ! ) Fatal error: Uncaught Error: Call to a member function getAvailableStatuses() on null in
– divya sekar
17 hours ago
Have you addgetAvailableStatuses()
in your model file?
– Chirag Patel
17 hours ago
s i added in my model file
– divya sekar
17 hours ago
can you share your updated code in your question?
– Chirag Patel
17 hours ago
1
You can try with this magento.stackexchange.com/questions/217444/… It might work for you.
– Chirag Patel
16 hours ago
Error comes : ( ! ) Fatal error: Uncaught Error: Call to a member function getAvailableStatuses() on null in
– divya sekar
17 hours ago
Error comes : ( ! ) Fatal error: Uncaught Error: Call to a member function getAvailableStatuses() on null in
– divya sekar
17 hours ago
Have you add
getAvailableStatuses()
in your model file?– Chirag Patel
17 hours ago
Have you add
getAvailableStatuses()
in your model file?– Chirag Patel
17 hours ago
s i added in my model file
– divya sekar
17 hours ago
s i added in my model file
– divya sekar
17 hours ago
can you share your updated code in your question?
– Chirag Patel
17 hours ago
can you share your updated code in your question?
– Chirag Patel
17 hours ago
1
1
You can try with this magento.stackexchange.com/questions/217444/… It might work for you.
– Chirag Patel
16 hours ago
You can try with this magento.stackexchange.com/questions/217444/… It might work for you.
– Chirag Patel
16 hours 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">CMShippingbarModelStatus</item>
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Status</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>
</argument>
</column>
and CMShippingbarModelStatus.php code this way..
<?php
namespace CMShippingbarModel;
use MagentoFrameworkDataOptionSourceInterface;
/**
* ProductStatus Class
*/
class Status implements OptionSourceInterface
/**
* Get options
*
* @return array
*/
public function toOptionArray()
return [['value' => 1, 'label' => __('Enable')], ['value' => 0, 'label' => __('Disable')]];
In which file @rakesh
– divya sekar
18 hours ago
its not working rakesh
– divya sekar
17 hours ago
you have my code use and replace it?
– Rakesh Donga
17 hours ago
S I did it, its again show status '0' or '1'
– divya sekar
17 hours ago
prnt.sc/n6dyv9 i used it but it replicate same prnt.sc/n6dzm6
– divya sekar
17 hours ago
add a comment |
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">CMShippingbarModelStatus</item>
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Status</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>
</argument>
</column>
and CMShippingbarModelStatus.php code this way..
<?php
namespace CMShippingbarModel;
use MagentoFrameworkDataOptionSourceInterface;
/**
* ProductStatus Class
*/
class Status implements OptionSourceInterface
/**
* Get options
*
* @return array
*/
public function toOptionArray()
return [['value' => 1, 'label' => __('Enable')], ['value' => 0, 'label' => __('Disable')]];
In which file @rakesh
– divya sekar
18 hours ago
its not working rakesh
– divya sekar
17 hours ago
you have my code use and replace it?
– Rakesh Donga
17 hours ago
S I did it, its again show status '0' or '1'
– divya sekar
17 hours ago
prnt.sc/n6dyv9 i used it but it replicate same prnt.sc/n6dzm6
– divya sekar
17 hours ago
add a comment |
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">CMShippingbarModelStatus</item>
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Status</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>
</argument>
</column>
and CMShippingbarModelStatus.php code this way..
<?php
namespace CMShippingbarModel;
use MagentoFrameworkDataOptionSourceInterface;
/**
* ProductStatus Class
*/
class Status implements OptionSourceInterface
/**
* Get options
*
* @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">CMShippingbarModelStatus</item>
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Status</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>
</argument>
</column>
and CMShippingbarModelStatus.php code this way..
<?php
namespace CMShippingbarModel;
use MagentoFrameworkDataOptionSourceInterface;
/**
* ProductStatus Class
*/
class Status implements OptionSourceInterface
/**
* Get options
*
* @return array
*/
public function toOptionArray()
return [['value' => 1, 'label' => __('Enable')], ['value' => 0, 'label' => __('Disable')]];
edited 18 hours ago
answered 18 hours ago
Rakesh DongaRakesh Donga
2,368316
2,368316
In which file @rakesh
– divya sekar
18 hours ago
its not working rakesh
– divya sekar
17 hours ago
you have my code use and replace it?
– Rakesh Donga
17 hours ago
S I did it, its again show status '0' or '1'
– divya sekar
17 hours ago
prnt.sc/n6dyv9 i used it but it replicate same prnt.sc/n6dzm6
– divya sekar
17 hours ago
add a comment |
In which file @rakesh
– divya sekar
18 hours ago
its not working rakesh
– divya sekar
17 hours ago
you have my code use and replace it?
– Rakesh Donga
17 hours ago
S I did it, its again show status '0' or '1'
– divya sekar
17 hours ago
prnt.sc/n6dyv9 i used it but it replicate same prnt.sc/n6dzm6
– divya sekar
17 hours ago
In which file @rakesh
– divya sekar
18 hours ago
In which file @rakesh
– divya sekar
18 hours ago
its not working rakesh
– divya sekar
17 hours ago
its not working rakesh
– divya sekar
17 hours ago
you have my code use and replace it?
– Rakesh Donga
17 hours ago
you have my code use and replace it?
– Rakesh Donga
17 hours ago
S I did it, its again show status '0' or '1'
– divya sekar
17 hours ago
S I did it, its again show status '0' or '1'
– divya sekar
17 hours ago
prnt.sc/n6dyv9 i used it but it replicate same prnt.sc/n6dzm6
– divya sekar
17 hours ago
prnt.sc/n6dyv9 i used it but it replicate same prnt.sc/n6dzm6
– divya sekar
17 hours ago
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%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