0

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

1 Answer 1

2

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
9
  • i am asking for my custom admin grid.. the answer you provided it for sales module Commented Aug 1, 2020 at 12:22
  • Read the note, where I mention what you want to replace in above code. Commented Aug 1, 2020 at 12:23
  • Shall i add this code inside my UI component file's <listing> tag Commented Aug 1, 2020 at 12:28
  • Yes you need to add the code there. Commented Aug 1, 2020 at 12:29
  • export is working...kindly help me in import functionality Commented Aug 1, 2020 at 16:01

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.