Answer the question
In order to leave comments, you need to log in
ajax gridview update?
Good day! Question about Yii2. The situation is this. There is a view (formed by actionIndex) in which there are input fields for the start date and end date of the period and some more search criteria. In the controller in the actionIndex, I catch the ajax request, form the sqlDataProvider (The reason for choosing the SqlDataProvider is that I make a selection with a join from three tables) and pass this sqlDataProvider to the same view. I catch the button click in jquery. Here's how to make the gridview aware of the dataprovider change. After all, the grid will change only after reloading the entire page, and I need it to be updated without reloading the page. Is it possible to somehow assign a dataProvider to the source of the gridview in Ajax? Thank you! I would appreciate a hint.
Answer the question
In order to leave comments, you need to log in
Reply to Evgeny Prozorov. It's been a long time since I asked this question. Need to remember. Solution: the grid needs to be wrapped in pjax. And update the data in the controller. Dig into pjax.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question