4

I want to have a custom Grid in Admin Form tab using ui_component .

Here is my Grid ui_component for tab fieldset.

<fieldset name="assign_applicants">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="label" xsi:type="string" translate="true">Applicants</item>
                <item name="collapsible" xsi:type="boolean">true</item>
                <item name="sortOrder" xsi:type="number">30</item>
            </item>
        </argument>
        <container name="assign_products_container" >
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="sortOrder" xsi:type="number">160</item>
                </item>
            </argument>
            <htmlContent name="html_content">
                <argument name="block" xsi:type="object">Package_Name\Module\Block\Adminhtml\Job\AssignApplicants</argument>
            </htmlContent>
        </container>
    </fieldset>
4

In your <fieldset> section you could use <insertListing>.

    <fieldset name="assign_applicants">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="label" xsi:type="string" translate="true">Applicants</item>
                <item name="collapsible" xsi:type="boolean">true</item>
                <item name="sortOrder" xsi:type="number">30</item>
            </item>
        </argument>
        <insertListing>
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="autoRender" xsi:type="boolean">true</item>
                    <item name="ns" xsi:type="string">applicants_form_listing</item>
                </item>
            </argument>
        </insertListing>
    </fieldset>

In the ns config you specify the listing UI component's name. Then you define this component separately in the view/adminhtml/ui_component/applicants_form_listing.xml and describe what should be in the grid (you can check this thread for details).

  • It is working but it is not send data to controller. – Mayur Jotaniya Mar 30 at 6:18

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.