I have a treeview where the end user selects (clicks-on) a "partner" whose "territories" will be populated on a wice_grid on the same page. When the user clicks on a tree node I make an ajax GET handled by a rails controller with this:
class TerritoriesController < ApplicationController
...
def by_partner
partner = Seller.find(params[:id])
@territories_grid = initialize_grid(Territory.owned_by(partner), include: [:sellers, :city, :region])
respond_to do |format|
format.js { render :layout => false }
end
end
end
The controller does select the appropriate territories but the grid is not updated upon ajax call completion. How can I force a refresh or re-init of the grid so that it renders the new rows?
I have a treeview where the end user selects (clicks-on) a "partner" whose "territories" will be populated on a wice_grid on the same page. When the user clicks on a tree node I make an ajax GET handled by a rails controller with this:
The controller does select the appropriate territories but the grid is not updated upon ajax call completion. How can I force a refresh or re-init of the grid so that it renders the new rows?