Sorting Grid Column in magento2?Customer grid new column display when sortingCannot sorting joined column in Magento GridCustom renderered column sorting not working magento2Magento 2 UI grid non db dataprovider and pagination issueHow to display Yes/No values in admin grid (Magento2)?Customise grid collection in magento2?collection for grid in magento2Custom status label not showing on admin grid Magento2How to sort admin grid filter elements in Magento 2?Use join table to display data in admin grid column
Reusing studs to hang shoe bins
What is the meaning of “these lederhosen are riding up my Bundesliga”?
Is the internet in Madagascar faster than in UK?
Notice period 60 days but I need to join in 45 days
Unlock your Lock
Is it ok to record the 'environment' around my workplace?
What is this fighter jet at Weymouth NAS?
Is a memoized pure function itself considered pure?
How were medieval castles built in swamps or marshes without draining them?
Why error propagation in CBC mode encryption affect two blocks?
How to say "I only speak one which is English." in French?
Expressing an implication as ILP where each implication term comprises a chain of boolean ORs
3D cryptic featuring Mao, Stalin and Simba's uncle
How much does Commander Data weigh?
How to check whether a sublist exist in a huge database lists in a fast way?
Is this password scheme legit?
Router on a stick not connecting 2 different VLANs
What stops you from using fixed income in developing countries?
Can I renew my USA passport book and passport card separately?
Shift lens vs move body?
How to use properly "sich selbst"
Hangman game in Python - need feedback on the quality of code
Why is adding AC power easier than adding DC power?
What are the IPSE’s, the ASPE’s, the FRIPSE’s and the GRIPSE’s?
Sorting Grid Column in magento2?
Customer grid new column display when sortingCannot sorting joined column in Magento GridCustom renderered column sorting not working magento2Magento 2 UI grid non db dataprovider and pagination issueHow to display Yes/No values in admin grid (Magento2)?Customise grid collection in magento2?collection for grid in magento2Custom status label not showing on admin grid Magento2How to sort admin grid filter elements in Magento 2?Use 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;
I have created a ui component grid .
How to sorting the admin grid
<?xml version="1.0"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements_data_source</item>
<item name="deps" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements_data_source</item>
</item>
<item name="spinner" xsi:type="string">xx_stockmovements_stock_columns</item>
</argument>
<dataSource name="xx_stockmovements_stock_movements_data_source">
<argument name="dataProvider" xsi:type="configurableObject">
<argument name="class" xsi:type="string">XxStockMovementsGridDataProvider</argument>
<argument name="name" xsi:type="string">xx_stockmovements_stock_movements_data_source</argument>
<argument name="primaryFieldName" xsi:type="string">id</argument>
<argument name="requestFieldName" xsi:type="string">id</argument>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="update_url" xsi:type="url" path="mui/index/render"/>
<item name="storageConfig" xsi:type="array">
<item name="indexField" xsi:type="string">id</item>
</item>
</item>
</argument>
</argument>
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
</item>
</argument>
</dataSource>
<container name="listing_top">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="template" xsi:type="string">ui/grid/toolbar</item>
<item name="stickyTmpl" xsi:type="string">ui/grid/sticky/toolbar</item>
</item>
</argument>
<bookmark name="bookmarks">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="storageConfig" xsi:type="array">
<item name="namespace" xsi:type="string">xx_stockmovements_stock_movements</item>
</item>
</item>
</argument>
</bookmark>
<component name="columns_controls">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="columnsData" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_columns</item>
</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/controls/columns</item>
<item name="displayArea" xsi:type="string">dataGridActions</item>
</item>
</argument>
</component>
<exportButton name="export_button">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="selectProvider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.ids</item>
</item>
</argument>
</exportButton>
<filters name="listing_filters">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="columnsProvider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_columns</item>
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.listing_top.bookmarks</item>
<item name="namespace" xsi:type="string">current.filters</item>
</item>
<item name="templates" xsi:type="array">
<item name="filters" xsi:type="array">
<item name="select" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/form/element/ui-select</item>
<item name="template" xsi:type="string">ui/grid/filters/elements/ui-select</item>
</item>
</item>
</item>
<item name="childDefaults" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.listing_top.listing_filters</item>
<item name="imports" xsi:type="array">
<item name="visible" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_columns.$ $.index :visible</item>
</item>
</item>
</item>
<item name="observers" xsi:type="array">
<item name="column" xsi:type="string">column</item>
</item>
</argument>
</filters>
<paging name="listing_paging">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.listing_top.bookmarks</item>
<item name="namespace" xsi:type="string">current.paging</item>
</item>
<item name="selectProvider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_columns.ids</item>
</item>
</argument>
</paging>
</container>
<columns name="xx_stockmovements_stock_columns">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.listing_top.bookmarks</item>
<item name="namespace" xsi:type="string">current</item>
</item>
<item name="childDefaults" xsi:type="array">
<item name="fieldAction" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_columns_editor</item>
<item name="target" xsi:type="string">startEdit</item>
<item name="params" xsi:type="array">
<item name="0" xsi:type="string">$ $.$data.rowIndex </item>
<item name="1" xsi:type="boolean">true</item>
</item>
</item>
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.listing_top.bookmarks</item>
<item name="root" xsi:type="string">columns.$ $.index </item>
<item name="namespace" xsi:type="string">current.$ $.storageConfig.root</item>
</item>
</item>
</item>
</argument>
<column name="product_sku" class="XxStockMovementsUiComponentListingColumnsProduct">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Sku</item>
<item name="sorting" xsi:type="string">desc</item>
<!--<item name="sortable" xsi:type="boolean">true</item>-->
</item>
</argument>
</column>
<column name="qty">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Qty</item>
<item name="sortable" xsi:type="string">asc</item>
</item>
</argument>
</column>
<column name="movement">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Movement</item>
<item name="sortable" xsi:type="boolean">false</item>
</item>
</argument>
</column>
<column name="is_in_stock">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">XxStockMovementsModelColumnInStock</item>
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">select</item>
<item name="label" translate="true" xsi:type="string">In Stock</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
<item name="dataType" xsi:type="string">select</item>
<item name="sortable" xsi:type="string">asc</item>
</item>
</argument>
</column>
<column name="message">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Message</item>
<item name="sortable" xsi:type="string">asc</item>
</item>
</argument>
<settings>
<filter>textRange</filter>
<label translate="true">Message</label>
<sorting>asc</sorting>
</settings>
</column>
<column name="user">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">User</item>
<item name="sortable" xsi:type="string">asc</item>
</item>
</argument>
</column>
<column name="created_at" class="MagentoUiComponentListingColumnsDate">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">dateRange</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/date</item>
<item name="dataType" xsi:type="string">date</item>
<item name="label" xsi:type="string" translate="true">Created At</item>
<item name="sortable" xsi:type="string">asc</item>
</item>
</argument>
</column>
</columns>
</listing>
I also trying
<item name="sorting" xsi:type="string">desc</item>
<item name="sortable" xsi:type="boolean">true</item>
But its not working
magento2.2 grid php-7
add a comment |
I have created a ui component grid .
How to sorting the admin grid
<?xml version="1.0"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements_data_source</item>
<item name="deps" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements_data_source</item>
</item>
<item name="spinner" xsi:type="string">xx_stockmovements_stock_columns</item>
</argument>
<dataSource name="xx_stockmovements_stock_movements_data_source">
<argument name="dataProvider" xsi:type="configurableObject">
<argument name="class" xsi:type="string">XxStockMovementsGridDataProvider</argument>
<argument name="name" xsi:type="string">xx_stockmovements_stock_movements_data_source</argument>
<argument name="primaryFieldName" xsi:type="string">id</argument>
<argument name="requestFieldName" xsi:type="string">id</argument>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="update_url" xsi:type="url" path="mui/index/render"/>
<item name="storageConfig" xsi:type="array">
<item name="indexField" xsi:type="string">id</item>
</item>
</item>
</argument>
</argument>
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
</item>
</argument>
</dataSource>
<container name="listing_top">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="template" xsi:type="string">ui/grid/toolbar</item>
<item name="stickyTmpl" xsi:type="string">ui/grid/sticky/toolbar</item>
</item>
</argument>
<bookmark name="bookmarks">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="storageConfig" xsi:type="array">
<item name="namespace" xsi:type="string">xx_stockmovements_stock_movements</item>
</item>
</item>
</argument>
</bookmark>
<component name="columns_controls">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="columnsData" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_columns</item>
</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/controls/columns</item>
<item name="displayArea" xsi:type="string">dataGridActions</item>
</item>
</argument>
</component>
<exportButton name="export_button">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="selectProvider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.ids</item>
</item>
</argument>
</exportButton>
<filters name="listing_filters">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="columnsProvider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_columns</item>
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.listing_top.bookmarks</item>
<item name="namespace" xsi:type="string">current.filters</item>
</item>
<item name="templates" xsi:type="array">
<item name="filters" xsi:type="array">
<item name="select" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/form/element/ui-select</item>
<item name="template" xsi:type="string">ui/grid/filters/elements/ui-select</item>
</item>
</item>
</item>
<item name="childDefaults" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.listing_top.listing_filters</item>
<item name="imports" xsi:type="array">
<item name="visible" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_columns.$ $.index :visible</item>
</item>
</item>
</item>
<item name="observers" xsi:type="array">
<item name="column" xsi:type="string">column</item>
</item>
</argument>
</filters>
<paging name="listing_paging">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.listing_top.bookmarks</item>
<item name="namespace" xsi:type="string">current.paging</item>
</item>
<item name="selectProvider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_columns.ids</item>
</item>
</argument>
</paging>
</container>
<columns name="xx_stockmovements_stock_columns">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.listing_top.bookmarks</item>
<item name="namespace" xsi:type="string">current</item>
</item>
<item name="childDefaults" xsi:type="array">
<item name="fieldAction" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_columns_editor</item>
<item name="target" xsi:type="string">startEdit</item>
<item name="params" xsi:type="array">
<item name="0" xsi:type="string">$ $.$data.rowIndex </item>
<item name="1" xsi:type="boolean">true</item>
</item>
</item>
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.listing_top.bookmarks</item>
<item name="root" xsi:type="string">columns.$ $.index </item>
<item name="namespace" xsi:type="string">current.$ $.storageConfig.root</item>
</item>
</item>
</item>
</argument>
<column name="product_sku" class="XxStockMovementsUiComponentListingColumnsProduct">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Sku</item>
<item name="sorting" xsi:type="string">desc</item>
<!--<item name="sortable" xsi:type="boolean">true</item>-->
</item>
</argument>
</column>
<column name="qty">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Qty</item>
<item name="sortable" xsi:type="string">asc</item>
</item>
</argument>
</column>
<column name="movement">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Movement</item>
<item name="sortable" xsi:type="boolean">false</item>
</item>
</argument>
</column>
<column name="is_in_stock">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">XxStockMovementsModelColumnInStock</item>
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">select</item>
<item name="label" translate="true" xsi:type="string">In Stock</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
<item name="dataType" xsi:type="string">select</item>
<item name="sortable" xsi:type="string">asc</item>
</item>
</argument>
</column>
<column name="message">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Message</item>
<item name="sortable" xsi:type="string">asc</item>
</item>
</argument>
<settings>
<filter>textRange</filter>
<label translate="true">Message</label>
<sorting>asc</sorting>
</settings>
</column>
<column name="user">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">User</item>
<item name="sortable" xsi:type="string">asc</item>
</item>
</argument>
</column>
<column name="created_at" class="MagentoUiComponentListingColumnsDate">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">dateRange</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/date</item>
<item name="dataType" xsi:type="string">date</item>
<item name="label" xsi:type="string" translate="true">Created At</item>
<item name="sortable" xsi:type="string">asc</item>
</item>
</argument>
</column>
</columns>
</listing>
I also trying
<item name="sorting" xsi:type="string">desc</item>
<item name="sortable" xsi:type="boolean">true</item>
But its not working
magento2.2 grid php-7
Can you please upload your xml code of ui grid?
– Rohan Hapani
Mar 28 '18 at 12:59
add a comment |
I have created a ui component grid .
How to sorting the admin grid
<?xml version="1.0"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements_data_source</item>
<item name="deps" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements_data_source</item>
</item>
<item name="spinner" xsi:type="string">xx_stockmovements_stock_columns</item>
</argument>
<dataSource name="xx_stockmovements_stock_movements_data_source">
<argument name="dataProvider" xsi:type="configurableObject">
<argument name="class" xsi:type="string">XxStockMovementsGridDataProvider</argument>
<argument name="name" xsi:type="string">xx_stockmovements_stock_movements_data_source</argument>
<argument name="primaryFieldName" xsi:type="string">id</argument>
<argument name="requestFieldName" xsi:type="string">id</argument>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="update_url" xsi:type="url" path="mui/index/render"/>
<item name="storageConfig" xsi:type="array">
<item name="indexField" xsi:type="string">id</item>
</item>
</item>
</argument>
</argument>
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
</item>
</argument>
</dataSource>
<container name="listing_top">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="template" xsi:type="string">ui/grid/toolbar</item>
<item name="stickyTmpl" xsi:type="string">ui/grid/sticky/toolbar</item>
</item>
</argument>
<bookmark name="bookmarks">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="storageConfig" xsi:type="array">
<item name="namespace" xsi:type="string">xx_stockmovements_stock_movements</item>
</item>
</item>
</argument>
</bookmark>
<component name="columns_controls">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="columnsData" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_columns</item>
</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/controls/columns</item>
<item name="displayArea" xsi:type="string">dataGridActions</item>
</item>
</argument>
</component>
<exportButton name="export_button">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="selectProvider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.ids</item>
</item>
</argument>
</exportButton>
<filters name="listing_filters">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="columnsProvider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_columns</item>
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.listing_top.bookmarks</item>
<item name="namespace" xsi:type="string">current.filters</item>
</item>
<item name="templates" xsi:type="array">
<item name="filters" xsi:type="array">
<item name="select" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/form/element/ui-select</item>
<item name="template" xsi:type="string">ui/grid/filters/elements/ui-select</item>
</item>
</item>
</item>
<item name="childDefaults" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.listing_top.listing_filters</item>
<item name="imports" xsi:type="array">
<item name="visible" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_columns.$ $.index :visible</item>
</item>
</item>
</item>
<item name="observers" xsi:type="array">
<item name="column" xsi:type="string">column</item>
</item>
</argument>
</filters>
<paging name="listing_paging">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.listing_top.bookmarks</item>
<item name="namespace" xsi:type="string">current.paging</item>
</item>
<item name="selectProvider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_columns.ids</item>
</item>
</argument>
</paging>
</container>
<columns name="xx_stockmovements_stock_columns">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.listing_top.bookmarks</item>
<item name="namespace" xsi:type="string">current</item>
</item>
<item name="childDefaults" xsi:type="array">
<item name="fieldAction" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_columns_editor</item>
<item name="target" xsi:type="string">startEdit</item>
<item name="params" xsi:type="array">
<item name="0" xsi:type="string">$ $.$data.rowIndex </item>
<item name="1" xsi:type="boolean">true</item>
</item>
</item>
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.listing_top.bookmarks</item>
<item name="root" xsi:type="string">columns.$ $.index </item>
<item name="namespace" xsi:type="string">current.$ $.storageConfig.root</item>
</item>
</item>
</item>
</argument>
<column name="product_sku" class="XxStockMovementsUiComponentListingColumnsProduct">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Sku</item>
<item name="sorting" xsi:type="string">desc</item>
<!--<item name="sortable" xsi:type="boolean">true</item>-->
</item>
</argument>
</column>
<column name="qty">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Qty</item>
<item name="sortable" xsi:type="string">asc</item>
</item>
</argument>
</column>
<column name="movement">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Movement</item>
<item name="sortable" xsi:type="boolean">false</item>
</item>
</argument>
</column>
<column name="is_in_stock">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">XxStockMovementsModelColumnInStock</item>
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">select</item>
<item name="label" translate="true" xsi:type="string">In Stock</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
<item name="dataType" xsi:type="string">select</item>
<item name="sortable" xsi:type="string">asc</item>
</item>
</argument>
</column>
<column name="message">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Message</item>
<item name="sortable" xsi:type="string">asc</item>
</item>
</argument>
<settings>
<filter>textRange</filter>
<label translate="true">Message</label>
<sorting>asc</sorting>
</settings>
</column>
<column name="user">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">User</item>
<item name="sortable" xsi:type="string">asc</item>
</item>
</argument>
</column>
<column name="created_at" class="MagentoUiComponentListingColumnsDate">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">dateRange</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/date</item>
<item name="dataType" xsi:type="string">date</item>
<item name="label" xsi:type="string" translate="true">Created At</item>
<item name="sortable" xsi:type="string">asc</item>
</item>
</argument>
</column>
</columns>
</listing>
I also trying
<item name="sorting" xsi:type="string">desc</item>
<item name="sortable" xsi:type="boolean">true</item>
But its not working
magento2.2 grid php-7
I have created a ui component grid .
How to sorting the admin grid
<?xml version="1.0"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements_data_source</item>
<item name="deps" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements_data_source</item>
</item>
<item name="spinner" xsi:type="string">xx_stockmovements_stock_columns</item>
</argument>
<dataSource name="xx_stockmovements_stock_movements_data_source">
<argument name="dataProvider" xsi:type="configurableObject">
<argument name="class" xsi:type="string">XxStockMovementsGridDataProvider</argument>
<argument name="name" xsi:type="string">xx_stockmovements_stock_movements_data_source</argument>
<argument name="primaryFieldName" xsi:type="string">id</argument>
<argument name="requestFieldName" xsi:type="string">id</argument>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="update_url" xsi:type="url" path="mui/index/render"/>
<item name="storageConfig" xsi:type="array">
<item name="indexField" xsi:type="string">id</item>
</item>
</item>
</argument>
</argument>
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
</item>
</argument>
</dataSource>
<container name="listing_top">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="template" xsi:type="string">ui/grid/toolbar</item>
<item name="stickyTmpl" xsi:type="string">ui/grid/sticky/toolbar</item>
</item>
</argument>
<bookmark name="bookmarks">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="storageConfig" xsi:type="array">
<item name="namespace" xsi:type="string">xx_stockmovements_stock_movements</item>
</item>
</item>
</argument>
</bookmark>
<component name="columns_controls">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="columnsData" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_columns</item>
</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/controls/columns</item>
<item name="displayArea" xsi:type="string">dataGridActions</item>
</item>
</argument>
</component>
<exportButton name="export_button">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="selectProvider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.ids</item>
</item>
</argument>
</exportButton>
<filters name="listing_filters">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="columnsProvider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_columns</item>
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.listing_top.bookmarks</item>
<item name="namespace" xsi:type="string">current.filters</item>
</item>
<item name="templates" xsi:type="array">
<item name="filters" xsi:type="array">
<item name="select" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/form/element/ui-select</item>
<item name="template" xsi:type="string">ui/grid/filters/elements/ui-select</item>
</item>
</item>
</item>
<item name="childDefaults" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.listing_top.listing_filters</item>
<item name="imports" xsi:type="array">
<item name="visible" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_columns.$ $.index :visible</item>
</item>
</item>
</item>
<item name="observers" xsi:type="array">
<item name="column" xsi:type="string">column</item>
</item>
</argument>
</filters>
<paging name="listing_paging">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.listing_top.bookmarks</item>
<item name="namespace" xsi:type="string">current.paging</item>
</item>
<item name="selectProvider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_columns.ids</item>
</item>
</argument>
</paging>
</container>
<columns name="xx_stockmovements_stock_columns">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.listing_top.bookmarks</item>
<item name="namespace" xsi:type="string">current</item>
</item>
<item name="childDefaults" xsi:type="array">
<item name="fieldAction" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.xx_stockmovements_stock_columns_editor</item>
<item name="target" xsi:type="string">startEdit</item>
<item name="params" xsi:type="array">
<item name="0" xsi:type="string">$ $.$data.rowIndex </item>
<item name="1" xsi:type="boolean">true</item>
</item>
</item>
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">xx_stockmovements_stock_movements.xx_stockmovements_stock_movements.listing_top.bookmarks</item>
<item name="root" xsi:type="string">columns.$ $.index </item>
<item name="namespace" xsi:type="string">current.$ $.storageConfig.root</item>
</item>
</item>
</item>
</argument>
<column name="product_sku" class="XxStockMovementsUiComponentListingColumnsProduct">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Sku</item>
<item name="sorting" xsi:type="string">desc</item>
<!--<item name="sortable" xsi:type="boolean">true</item>-->
</item>
</argument>
</column>
<column name="qty">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Qty</item>
<item name="sortable" xsi:type="string">asc</item>
</item>
</argument>
</column>
<column name="movement">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Movement</item>
<item name="sortable" xsi:type="boolean">false</item>
</item>
</argument>
</column>
<column name="is_in_stock">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">XxStockMovementsModelColumnInStock</item>
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">select</item>
<item name="label" translate="true" xsi:type="string">In Stock</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
<item name="dataType" xsi:type="string">select</item>
<item name="sortable" xsi:type="string">asc</item>
</item>
</argument>
</column>
<column name="message">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Message</item>
<item name="sortable" xsi:type="string">asc</item>
</item>
</argument>
<settings>
<filter>textRange</filter>
<label translate="true">Message</label>
<sorting>asc</sorting>
</settings>
</column>
<column name="user">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">User</item>
<item name="sortable" xsi:type="string">asc</item>
</item>
</argument>
</column>
<column name="created_at" class="MagentoUiComponentListingColumnsDate">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">dateRange</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/date</item>
<item name="dataType" xsi:type="string">date</item>
<item name="label" xsi:type="string" translate="true">Created At</item>
<item name="sortable" xsi:type="string">asc</item>
</item>
</argument>
</column>
</columns>
</listing>
I also trying
<item name="sorting" xsi:type="string">desc</item>
<item name="sortable" xsi:type="boolean">true</item>
But its not working
magento2.2 grid php-7
magento2.2 grid php-7
edited Mar 28 '18 at 13:22
Mano M
asked Mar 28 '18 at 12:48
Mano MMano M
1,1804 silver badges26 bronze badges
1,1804 silver badges26 bronze badges
Can you please upload your xml code of ui grid?
– Rohan Hapani
Mar 28 '18 at 12:59
add a comment |
Can you please upload your xml code of ui grid?
– Rohan Hapani
Mar 28 '18 at 12:59
Can you please upload your xml code of ui grid?
– Rohan Hapani
Mar 28 '18 at 12:59
Can you please upload your xml code of ui grid?
– Rohan Hapani
Mar 28 '18 at 12:59
add a comment |
3 Answers
3
active
oldest
votes
Have You tried Like below code in Ui_component form file
<item name="sortOrder" xsi:type="number">10</item>
add a comment |
Try Below code
<column name="product_sku" class="XxStockMovementsUiComponentListingColumnsProduct">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Sku</item>
<item name="sorting" xsi:type="string">desc</item>
<item name="sortable" xsi:type="boolean">true</item>
<item name="sortOrder" xsi:type="number">1</item>
</item>
</argument>
</column>
Remove Cache
php bin/magento cache:clean
php bin/magento cache:flush
Hope it Helps.
add a comment |
I had exactly the same problem.
You first have to do your columns like this:
<column name="product_sku" class="XxStockMovementsUiComponentListingColumnsProduct">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Sku</item>
<item name="sorting" xsi:type="string">desc</item>
<item name="sortable" xsi:type="boolean">true</item>
<item name="sortOrder" xsi:type="number">1</item>
</item>
</argument>
</column>
Thereafter you need to go to your database table. search for table :
ui_bookmark
search for the column that relates to your grid i.e
product_attributes_listing
delete the column and then :
php bin/magento cache:clean
php bin/magento cache:flush
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%2f220202%2fsorting-grid-column-in-magento2%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
Have You tried Like below code in Ui_component form file
<item name="sortOrder" xsi:type="number">10</item>
add a comment |
Have You tried Like below code in Ui_component form file
<item name="sortOrder" xsi:type="number">10</item>
add a comment |
Have You tried Like below code in Ui_component form file
<item name="sortOrder" xsi:type="number">10</item>
Have You tried Like below code in Ui_component form file
<item name="sortOrder" xsi:type="number">10</item>
answered Mar 28 '18 at 12:59
Learing_CoderLearing_Coder
6693 silver badges19 bronze badges
6693 silver badges19 bronze badges
add a comment |
add a comment |
Try Below code
<column name="product_sku" class="XxStockMovementsUiComponentListingColumnsProduct">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Sku</item>
<item name="sorting" xsi:type="string">desc</item>
<item name="sortable" xsi:type="boolean">true</item>
<item name="sortOrder" xsi:type="number">1</item>
</item>
</argument>
</column>
Remove Cache
php bin/magento cache:clean
php bin/magento cache:flush
Hope it Helps.
add a comment |
Try Below code
<column name="product_sku" class="XxStockMovementsUiComponentListingColumnsProduct">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Sku</item>
<item name="sorting" xsi:type="string">desc</item>
<item name="sortable" xsi:type="boolean">true</item>
<item name="sortOrder" xsi:type="number">1</item>
</item>
</argument>
</column>
Remove Cache
php bin/magento cache:clean
php bin/magento cache:flush
Hope it Helps.
add a comment |
Try Below code
<column name="product_sku" class="XxStockMovementsUiComponentListingColumnsProduct">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Sku</item>
<item name="sorting" xsi:type="string">desc</item>
<item name="sortable" xsi:type="boolean">true</item>
<item name="sortOrder" xsi:type="number">1</item>
</item>
</argument>
</column>
Remove Cache
php bin/magento cache:clean
php bin/magento cache:flush
Hope it Helps.
Try Below code
<column name="product_sku" class="XxStockMovementsUiComponentListingColumnsProduct">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Sku</item>
<item name="sorting" xsi:type="string">desc</item>
<item name="sortable" xsi:type="boolean">true</item>
<item name="sortOrder" xsi:type="number">1</item>
</item>
</argument>
</column>
Remove Cache
php bin/magento cache:clean
php bin/magento cache:flush
Hope it Helps.
answered Jul 24 at 9:49
Mohit RaneMohit Rane
1,32618 bronze badges
1,32618 bronze badges
add a comment |
add a comment |
I had exactly the same problem.
You first have to do your columns like this:
<column name="product_sku" class="XxStockMovementsUiComponentListingColumnsProduct">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Sku</item>
<item name="sorting" xsi:type="string">desc</item>
<item name="sortable" xsi:type="boolean">true</item>
<item name="sortOrder" xsi:type="number">1</item>
</item>
</argument>
</column>
Thereafter you need to go to your database table. search for table :
ui_bookmark
search for the column that relates to your grid i.e
product_attributes_listing
delete the column and then :
php bin/magento cache:clean
php bin/magento cache:flush
add a comment |
I had exactly the same problem.
You first have to do your columns like this:
<column name="product_sku" class="XxStockMovementsUiComponentListingColumnsProduct">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Sku</item>
<item name="sorting" xsi:type="string">desc</item>
<item name="sortable" xsi:type="boolean">true</item>
<item name="sortOrder" xsi:type="number">1</item>
</item>
</argument>
</column>
Thereafter you need to go to your database table. search for table :
ui_bookmark
search for the column that relates to your grid i.e
product_attributes_listing
delete the column and then :
php bin/magento cache:clean
php bin/magento cache:flush
add a comment |
I had exactly the same problem.
You first have to do your columns like this:
<column name="product_sku" class="XxStockMovementsUiComponentListingColumnsProduct">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Sku</item>
<item name="sorting" xsi:type="string">desc</item>
<item name="sortable" xsi:type="boolean">true</item>
<item name="sortOrder" xsi:type="number">1</item>
</item>
</argument>
</column>
Thereafter you need to go to your database table. search for table :
ui_bookmark
search for the column that relates to your grid i.e
product_attributes_listing
delete the column and then :
php bin/magento cache:clean
php bin/magento cache:flush
I had exactly the same problem.
You first have to do your columns like this:
<column name="product_sku" class="XxStockMovementsUiComponentListingColumnsProduct">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Sku</item>
<item name="sorting" xsi:type="string">desc</item>
<item name="sortable" xsi:type="boolean">true</item>
<item name="sortOrder" xsi:type="number">1</item>
</item>
</argument>
</column>
Thereafter you need to go to your database table. search for table :
ui_bookmark
search for the column that relates to your grid i.e
product_attributes_listing
delete the column and then :
php bin/magento cache:clean
php bin/magento cache:flush
answered Aug 14 at 13:15
theSeekertheSeeker
1218 bronze badges
1218 bronze badges
add a comment |
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%2f220202%2fsorting-grid-column-in-magento2%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
Can you please upload your xml code of ui grid?
– Rohan Hapani
Mar 28 '18 at 12:59