I don't have any idea to do import and export functionality in Magento 2 for my custom module grid. Kindly help and suggest me some solutions.
asked Aug 1, 2020 at 11:30
SUBBULAKSHMI G
3214 silver badges20 bronze badges
1 Answer 1
You can added this code into the ui files so it added export button on your grid.
<exportButton name="export_button">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="selectProvider" xsi:type="string">sales_order_grid.sales_order_grid.sales_order_columns.ids</item>
</item>
</argument>
</exportButton>
NOTE:
you need to replace sales_order_grid with your provider.
answered Aug 1, 2020 at 12:09
Dhiren Vasoya
9,70914 gold badges37 silver badges61 bronze badges
-
i am asking for my custom admin grid.. the answer you provided it for sales moduleSUBBULAKSHMI G– SUBBULAKSHMI G2020年08月01日 12:22:24 +00:00Commented Aug 1, 2020 at 12:22
-
Read the note, where I mention what you want to replace in above code.Dhiren Vasoya– Dhiren Vasoya2020年08月01日 12:23:09 +00:00Commented Aug 1, 2020 at 12:23
-
Shall i add this code inside my UI component file's <listing> tagSUBBULAKSHMI G– SUBBULAKSHMI G2020年08月01日 12:28:00 +00:00Commented Aug 1, 2020 at 12:28
-
Yes you need to add the code there.Dhiren Vasoya– Dhiren Vasoya2020年08月01日 12:29:49 +00:00Commented Aug 1, 2020 at 12:29
-
export is working...kindly help me in import functionalitySUBBULAKSHMI G– SUBBULAKSHMI G2020年08月01日 16:01:14 +00:00Commented Aug 1, 2020 at 16:01
default