With the adoption of PJax on Yii2 things have change quite a bit with GridView when it comes to work with them in AJAX mode. It will probably be confusing at the beginning, but then you will soon realize how powerful the new approach is.
CHtml::ajaxLink(), CHtml::ajaxSubmitButton() and similar methods are great, but if they are located inside a portion of the page that is already loaded via ajax something bad will happen, something you may even not notice if you are not using tools like firebugs: the sent ajax requests will multiply themselves.
Created 4 years ago by nkd – How-tos – 2 comments – viewed 55,160 times
( +19 / -1 )
CButtonColumn in CGridView can be customised to include user built buttons. To learn a great deal about including custom buttons, read this excellent wiki.
This tutorial will show how to call an action from one custom button using AJAX instead of regular GET calls.
We all know how to upload the content and images at the same time with refreshing the page. And uploading the images using Ajax we have faced some issues, here i have fixed the issues and both content and photos are uploaded using Ajax. And both content and images are stored in the different tables