1

In Magento admin grid, select all alone is not selecting all the checkboxes, whereas select visible, unselect visible and unselect all is working fine. What might be the issue? help me to resolve this issue!

enter image description here

     <block class="Magento\Backend\Block\Widget\Grid" name="dckap_samplerequests_orders.grid"
         as="grid">
         <arguments>
             <argument name="id" xsi:type="string">requestsGrid</argument>
             <argument name="dataSource" xsi:type="object">Vendor\Module\Model\ResourceModel\Orders\Collection</argument>
             <argument name="default_sort" xsi:type="string">id</argument>
             <argument name="default_dir" xsi:type="string">desc</argument>
             <argument name="use_ajax" xsi:type="boolean">true</argument>
             <argument name="grid_url" xsi:type="url" path="*/*/grid">
                 <param name="_current">1</param>
             </argument>
         </arguments>
            <block class="Magento\Backend\Block\Widget\Grid\Massaction" 
                name="vendor_module_orders.grid.massaction" as="grid.massaction">
                <arguments>
                    <argument name="massaction_id_field" xsi:type="string">id</argument>
                    <argument name="form_field_name" xsi:type="string">orders</argument>
                    <argument name="options" xsi:type="array">
                        <item name="status1" xsi:type="array">
                            <item name="label" xsi:type="string" translate="true">Update Status to Processing</item>
                            <item name="url" xsi:type="string">*/*/massStatus/status/2</item>
                            <item name="confirm" xsi:type="string" translate="true">Are you sure want to update Status?</item>
                        </item>
                        <item name="status2" xsi:type="array">
                            <item name="label" xsi:type="string" translate="true">Update Status to Completed</item>
                            <item name="url" xsi:type="string">*/*/massStatus/status/3</item>
                            <item name="confirm" xsi:type="string" translate="true">Are you sure want to update Status?</item>
                        </item>
                        <item name="status3" xsi:type="array">
                            <item name="label" xsi:type="string" translate="true">Update Status to Rejected</item>
                            <item name="url" xsi:type="string">*/*/massStatus/status/4</item>
                            <item name="confirm" xsi:type="string" translate="true">Are you sure want to update Status?</item>
                        </item>
                        <item name="delete" xsi:type="array">
                            <item name="label" xsi:type="string" translate="true">Delete</item>
                            <item name="url" xsi:type="string">*/*/massDelete</item>
                            <item name="confirm" xsi:type="string" translate="true">Are you sure want to delete?</item>
                        </item>
                    </argument>
                </arguments>
            </block>
            <block class="Magento\Backend\Block\Widget\Grid\ColumnSet" 
                name="vendor_module_orders.grid.columnSet" as="grid.columnSet">
                <arguments>
                    <argument name="rowUrl" xsi:type="array">
                        <item name="path" xsi:type="string">*/*/edit</item>
                        <item name="extraParamsTemplate" xsi:type="array">
                            <item name="id" xsi:type="string">getId</item>
                        </item>
                    </argument>
                </arguments>
                <block class="Magento\Backend\Block\Widget\Grid\Column" as="id">
                    <arguments>
                        <argument name="header" xsi:type="string" translate="true">
                            ID
                        </argument>
                        <argument name="type" xsi:type="string">number</argument>
                        <argument name="id" xsi:type="string">id</argument>
                        <argument name="index" xsi:type="string">request_id</argument>
                        <argument name="renderer" xsi:type="string">Vendor\Module\Block\Adminhtml\Renderer\Increment</argument>
                    </arguments>
                </block>


            </block>
     </block>
  </referenceBlock>
</body> 
  • show us the xml code for the column – Philipp Sander Mar 7 at 11:56
0

I found the solution to this issue. Problem: Invalid id given for massaction_id_field in XML. After updating it ( to Schema's primary column name, it works like a charm!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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