Magento 2: How to insert a grid listing in admin form with form-ID filter
I added a grid like below in my form fieldset:
<insertListing>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="ns" xsi:type="string">mcas_taric_taricchapter_listing</item>
<item name="autoRender" xsi:type="boolean">true</item>
</item>
</argument>
</insertListing>
My first error is, that the grid is displayed with a horizontal scrollbar.
Now I have tried to filter the listing by url-params. Example for my url is:
http://mcas-systems.eu/admin/mcas_taric/taricsection/edit/taricsection_id/153694/key/
In my grid listing I have the following code:
<dataSource name="mcas_taric_taricchapter_listing_data_source">
<argument name="dataProvider" xsi:type="configurableObject">
<argument name="class" xsi:type="string">MagentoFrameworkViewElementUiComponentDataProviderDataProvider</argument>
<argument name="name" xsi:type="string">mcas_taric_taricchapter_listing_data_source</argument>
<argument name="primaryFieldName" xsi:type="string">taricchapter_id</argument>
<argument name="requestFieldName" xsi:type="string">id</argument>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
<item name="storageConfig" xsi:type="array">
<item name="indexField" xsi:type="string">taricsection_id</item>
</item>
<item name="update_url" xsi:type="url" path="mui/index/render"/>
<item name="filter_url_params" xsi:type="array">
<item name="taricsection_id" xsi:type="string">*</item>
</item>
</item>
</argument>
</argument>
</dataSource>
I dont know why, but the taricsection_id is not used to filter my grid. If I set a hardcoded value for the transaction_id it works.
So my question, do I have to add or edit further files to get the params of my url???
Please help me, I try to fix this problem since 2 weeks.
PS: Sorry, if you find errors in my english, I am frustrated and I have taken 2 german beers.
CHEERES from Germany
Christian
magento2 grid filter insertlisting
add a comment |
I added a grid like below in my form fieldset:
<insertListing>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="ns" xsi:type="string">mcas_taric_taricchapter_listing</item>
<item name="autoRender" xsi:type="boolean">true</item>
</item>
</argument>
</insertListing>
My first error is, that the grid is displayed with a horizontal scrollbar.
Now I have tried to filter the listing by url-params. Example for my url is:
http://mcas-systems.eu/admin/mcas_taric/taricsection/edit/taricsection_id/153694/key/
In my grid listing I have the following code:
<dataSource name="mcas_taric_taricchapter_listing_data_source">
<argument name="dataProvider" xsi:type="configurableObject">
<argument name="class" xsi:type="string">MagentoFrameworkViewElementUiComponentDataProviderDataProvider</argument>
<argument name="name" xsi:type="string">mcas_taric_taricchapter_listing_data_source</argument>
<argument name="primaryFieldName" xsi:type="string">taricchapter_id</argument>
<argument name="requestFieldName" xsi:type="string">id</argument>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
<item name="storageConfig" xsi:type="array">
<item name="indexField" xsi:type="string">taricsection_id</item>
</item>
<item name="update_url" xsi:type="url" path="mui/index/render"/>
<item name="filter_url_params" xsi:type="array">
<item name="taricsection_id" xsi:type="string">*</item>
</item>
</item>
</argument>
</argument>
</dataSource>
I dont know why, but the taricsection_id is not used to filter my grid. If I set a hardcoded value for the transaction_id it works.
So my question, do I have to add or edit further files to get the params of my url???
Please help me, I try to fix this problem since 2 weeks.
PS: Sorry, if you find errors in my english, I am frustrated and I have taken 2 german beers.
CHEERES from Germany
Christian
magento2 grid filter insertlisting
add a comment |
I added a grid like below in my form fieldset:
<insertListing>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="ns" xsi:type="string">mcas_taric_taricchapter_listing</item>
<item name="autoRender" xsi:type="boolean">true</item>
</item>
</argument>
</insertListing>
My first error is, that the grid is displayed with a horizontal scrollbar.
Now I have tried to filter the listing by url-params. Example for my url is:
http://mcas-systems.eu/admin/mcas_taric/taricsection/edit/taricsection_id/153694/key/
In my grid listing I have the following code:
<dataSource name="mcas_taric_taricchapter_listing_data_source">
<argument name="dataProvider" xsi:type="configurableObject">
<argument name="class" xsi:type="string">MagentoFrameworkViewElementUiComponentDataProviderDataProvider</argument>
<argument name="name" xsi:type="string">mcas_taric_taricchapter_listing_data_source</argument>
<argument name="primaryFieldName" xsi:type="string">taricchapter_id</argument>
<argument name="requestFieldName" xsi:type="string">id</argument>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
<item name="storageConfig" xsi:type="array">
<item name="indexField" xsi:type="string">taricsection_id</item>
</item>
<item name="update_url" xsi:type="url" path="mui/index/render"/>
<item name="filter_url_params" xsi:type="array">
<item name="taricsection_id" xsi:type="string">*</item>
</item>
</item>
</argument>
</argument>
</dataSource>
I dont know why, but the taricsection_id is not used to filter my grid. If I set a hardcoded value for the transaction_id it works.
So my question, do I have to add or edit further files to get the params of my url???
Please help me, I try to fix this problem since 2 weeks.
PS: Sorry, if you find errors in my english, I am frustrated and I have taken 2 german beers.
CHEERES from Germany
Christian
magento2 grid filter insertlisting
I added a grid like below in my form fieldset:
<insertListing>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="ns" xsi:type="string">mcas_taric_taricchapter_listing</item>
<item name="autoRender" xsi:type="boolean">true</item>
</item>
</argument>
</insertListing>
My first error is, that the grid is displayed with a horizontal scrollbar.
Now I have tried to filter the listing by url-params. Example for my url is:
http://mcas-systems.eu/admin/mcas_taric/taricsection/edit/taricsection_id/153694/key/
In my grid listing I have the following code:
<dataSource name="mcas_taric_taricchapter_listing_data_source">
<argument name="dataProvider" xsi:type="configurableObject">
<argument name="class" xsi:type="string">MagentoFrameworkViewElementUiComponentDataProviderDataProvider</argument>
<argument name="name" xsi:type="string">mcas_taric_taricchapter_listing_data_source</argument>
<argument name="primaryFieldName" xsi:type="string">taricchapter_id</argument>
<argument name="requestFieldName" xsi:type="string">id</argument>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
<item name="storageConfig" xsi:type="array">
<item name="indexField" xsi:type="string">taricsection_id</item>
</item>
<item name="update_url" xsi:type="url" path="mui/index/render"/>
<item name="filter_url_params" xsi:type="array">
<item name="taricsection_id" xsi:type="string">*</item>
</item>
</item>
</argument>
</argument>
</dataSource>
I dont know why, but the taricsection_id is not used to filter my grid. If I set a hardcoded value for the transaction_id it works.
So my question, do I have to add or edit further files to get the params of my url???
Please help me, I try to fix this problem since 2 weeks.
PS: Sorry, if you find errors in my english, I am frustrated and I have taken 2 german beers.
CHEERES from Germany
Christian
magento2 grid filter insertlisting
magento2 grid filter insertlisting
asked Jun 26 '18 at 15:48
Dr. Christian KuscheDr. Christian Kusche
364
364
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Hey have you find any solution for that issue.
same issue i am facing now.
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f231431%2fmagento-2-how-to-insert-a-grid-listing-in-admin-form-with-form-id-filter%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Hey have you find any solution for that issue.
same issue i am facing now.
New contributor
add a comment |
Hey have you find any solution for that issue.
same issue i am facing now.
New contributor
add a comment |
Hey have you find any solution for that issue.
same issue i am facing now.
New contributor
Hey have you find any solution for that issue.
same issue i am facing now.
New contributor
New contributor
answered 11 mins ago
Tarun PatadiaTarun Patadia
1
1
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f231431%2fmagento-2-how-to-insert-a-grid-listing-in-admin-form-with-form-id-filter%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown