I have a grid that select contact information. It works like contact-group-contacts-grid. I use a button to open a widget to render this grid. I can add and delete contact relationships using this grid. But the changes are not reflected in the grid if open the grid the second time. In another words, no matter what changes are made, the grid values remain the same.
The changes are only rendered when I load the view page and press the grid button again.
Hello, @zhex900! Grid is not refreshing itself. When you opened widget for whe first time, without refreshing, it will be the same. If I understood your twig template correctly, you are isnitializing grid only one time, when page is loading. Because of this, grid is changing only after refreshing page. So you need to implement some solution to get rendered grid from back and ( with ajax, possibly) insert it to widget
@akhristiansen, can you kindly give me a sample code of how to render grid from the back or ajax.
@mike, I did looked at Oro/Bundle/AccountBundle/Resources/views/Account/widget/contactsInfo.html.twig But I cannot make much sense of it. I don’t know how to use it. My twig can add and remove row selections. I don’t understand the datagrid.listener.CallbackListener script.
This past of code will refresh datagrid. I think you can execute it when button is clicked and before widget will be shown. I wanted to post something like that, but you was first :).
We collect cookie information with a goal to provide you with the best user experience. By using this website, you agree to our use of cookies. Read Oro Inc.’s Cookie policy.
We collect cookie information with a goal to provide you with the best user experience. By using this website, you agree to our use of cookies. Read Oro Inc.’s Cookie policy.