7

I have created a custom column to filter in sales order and the filters have been move to the bottom of the page. How could I move to the top? enter image description here

3
  • Is this a custom grid. Try clearing cache. Jun 9, 2017 at 8:53
  • @SumitVerma it is not a custom grid, it is the order grid. I have cleaned cache and it doesn't work.
    – raumatbel
    Jun 9, 2017 at 9:03
  • Can you provide your column declaration? Maybe there is something missing.
    – misterge
    Jun 9, 2017 at 9:22

3 Answers 3

14

You need to define dependency in your module.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Namespace_Modulename" setup_version="1.0.0">
        <sequence>
            <module name="Magento_Sales" />
        </sequence>
    </module>
</config>

disable and re enable your module and check.

8
  • I have defined the dependency, I have cleaned cache, I have run static content deploy in backend and I have even truncated the table ui_bookmark and it doesn't work.
    – raumatbel
    Jun 9, 2017 at 9:16
  • check the sequence of your module in app/etc/config.php if its above the Magento_Sales try placing below it and check
    – Priyank
    Jun 9, 2017 at 9:19
  • Still the same :(
    – raumatbel
    Jun 9, 2017 at 9:27
  • Thanks. It's works. I had dependencies in my module.xml badly written.
    – raumatbel
    Jun 9, 2017 at 9:34
  • 1
    @Priyank Yes, I agree with you. I've already added dependency in module.xml as above and that too worked for me. (y)
    – Deeps
    Dec 19, 2018 at 7:09
4

Please define dependencies in your module so that your module will load after the dependent one.

Add this code into your module.xml file

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Vendor_Modulename" setup_version="2.0.0"/>
    <sequence>
        <module name="Magento_Sales" />
    </sequence>
</config>

Please refresh the cache after this.

5
  • I have defined the dependency, I have cleaned cache, I have run static content deploy in backend and I have even truncated the table ui_bookmark and it doesn't work.
    – raumatbel
    Jun 9, 2017 at 9:16
  • Thanks. It's works. I had dependencies in my module.xml badly written.
    – raumatbel
    Jun 9, 2017 at 9:34
  • @raumatbel Can you please share how did you added dependencies in your module.xml? I'm facing the same issue.
    – Deeps
    May 17, 2018 at 9:35
  • @Deeps if you are adding a custom column in sales order, the dependency is the one described in the solution. Where do you want add your custom column?
    – raumatbel
    May 17, 2018 at 9:40
  • @raumatbel Dependency didn't worked for me. Solution given by Priyank in above thread worked for me. I made the changes in config.php and placed my custom module after Magento_sales.
    – Deeps
    May 18, 2018 at 8:32
1

Same issue i have faced in few day's back. In my case there were issue with listing_top position.

<container name="listing_top">
    ...
    ...
</container>
<columns name="">
</columns>

listing_top elements should be before elements.

First need to find all extended ui_component files from other modules. Check in one of file having listing_top element below elements. if it is then move before elements like above i have mentioned.

1
  • Thanks a lot... Ajay Gohel. You saved my time. I just placed <container name="listing_top"></container>. And that's done. Nov 25, 2019 at 10:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.