0

here my delete action

<action name="delete">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="type" xsi:type="string">delete</item>
                <item name="label" xsi:type="string" translate="true">Delete</item>
                <item name="url" xsi:type="url" path="faq/cat/massDelete"/>
                <item name="confirm" xsi:type="array">
                    <item name="title" xsi:type="string" translate="true">Delete FAQs</item>
                    <item name="message" xsi:type="string" translate="true">Are you sure you wan't to delete selected FAQs?</item>
                </item>
            </item>
        </argument>
    </action>

when I clicked on delete not working

2 Answers 2

1

no need to create XML file for that.

you just need to controller file for that.

ComnayName\ModuleName\Controller\Adminhtml\Index\massDelete.php

Make sure name of file is massDelete not massdelete.

Hope it will help you.

0

yes It is Necessary, You can this code in your Layout.xml files:-

<massaction name="listing_massaction">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="selectProvider" xsi:type="string">module_index_grid.module_index_grid.module_columns.ids</item>
                        <item name="indexField" xsi:type="string">module_id</item>
                    </item>
                </argument>
                <action name="delete">
                    <argument name="data" xsi:type="array">
                        <item name="config" xsi:type="array">
                            <item name="type" xsi:type="string">delete</item>
                            <item name="label" xsi:type="string" translate="true">Delete</item>
                            <item name="url" xsi:type="url" path="module/index/massDelete"/>
                            <item name="confirm" xsi:type="array">
                                <item name="title" xsi:type="string" translate="true">Delete</item>
                                <item name="message" xsi:type="string" translate="true">wan't to delete selected items?</item>
                            </item>
                        </item>
                    </argument>
                </action>            
 </massaction>
4

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.