I have a model with a category relation. In my model form i have dropdown to choose from existing categories, and a modal popup for editing or adding additional categories. But the modal submit reloads the page to insert and update.
Now, id like the modal submit button to close the modal, submit the form trough ajax and update the dropdown field.
‘modal popup for editing or adding additional categories’
Now here you have to stop your submit action with (for example jQuery), or use button.
Then use write Ajax call to push your data to controller and close modal popup and $.pjax.reload(’#pjax-container’) to refresh your main grid, on ajax.success event.