Hi,
I have an iframe shown when a subgrid is revealed, Is there a simple way to refresh the subgrid when a form in the iframe is submitted?
Many Thanks,
Stephen
Hello,
To reload parent grid from iframe …
$("#list1", window.parent.document).trigger("reloadGrid", [{current:true}]);
(where list1 is parent grid id)
Hi Abu,
I've tried the code below from the iframe ("sub1 is the name of my subgrid), however the subgrid is not refreshing, any ideas?
$("#sub1", window.parent.document).trigger("reloadGrid", [{current:true}]);
Thanks Stephen
Try this:
1) Define a function in parent grid file.
<script>
function reloadList() {
$("#sub1").trigger("reloadGrid");
};
</script>
2) And then from iframe file, call this reloadList(), e.g.
<a onclick='window.top.reloadList()'>Reload</a>
I also verified it, let me know if you need source.
Hi Abu,
Thanks for your help with this.
I have tested the script, I cannot get the subgrid "sub1" to refresh, if I change the name to "list1" the master grid does refresh. Is it possible to only refresh the subgrid?
Stephen
As you are calling this refresh code from subgrid (sub1), reload() function should work.
window.location.reload();
If this does not work, please email me the screenshots of your work and desired behavior you need.
Looks like i am not understanding it correctly.
You can email me at [email protected]