2

When using grid serializer with additional input columns, the additional fields are not actually reloaded, only an array containing the product_ids, but not the additional inputs.

<?xml version="1.0" encoding="UTF-8"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
    <container name="root" label="Root">
        <block class="VendorName\MyModule\Block\Adminhtml\Salesrep\Edit\Tab\Products" name="mymodule_edit_tab_products"/>
        <block class="Magento\Backend\Block\Widget\Grid\Serializer" name="products_grid_serializer">
            <arguments>
                <argument name="input_names" xsi:type="array">
                    <item name="0" xsi:type="string">product_field_select</item>
                    <item name="1" xsi:type="string">product_field_text</item>
                </argument>
                <argument name="grid_block" xsi:type="string">mymodule_edit_tab_products</argument>
                <argument name="callback" xsi:type="string">getSelectedProducts</argument>
                <argument name="input_element_name" xsi:type="string">products</argument>
                <argument name="reload_param_name" xsi:type="string">reload_products</argument>
            </arguments>
        </block>
    </container>
</layout>

The posted data for "reload_products" will only output an array with product keys:

array(
0 => "1805",
1 => "1604",
2 => "1804"
);

How can I include the additional "input_names" columns when the grid is reloaded? Additional input information is lost.

1
  • I too experiencing the same problem. have you got any solution ? if you have, could you please share ? Oct 1, 2020 at 9:20

0

Your Answer

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