User Post
15:19 27/03/2012
Yair Nevet
http://yairnevet.blogspot.com/
Member
posts 3
Post edited 15:21 – 27/03/2012 by Yair Nevet
Hi folks,
After deleting a record in a tree-view grid, the icons not change.
For example, a parent with a single leaf only: when I delete this single leaf, I'm expecting to see the parent's icon change to a leaf icon because it has no children anymore.
Only if I physically reload the page, the currect icons are seen.
Any idea how to solve it?
Thank you,
Yair
18:31 27/03/2012
tony
Sofia, Bulgaria
Moderator
posts 7007
Hello,
This is not automatically done, since you do custom delete.
You alredy have a solution – reloading the grid.
Regards
19:34 27/03/2012
Yair Nevet
http://yairnevet.blogspot.com/
Member
posts 3
tony said:
Hello,
This is not automatically done, since you do custom delete.
You alredy have a solution – reloading the grid.
Regards
Hi Tony,
I don't have a solution, the refresh i'm doing is clicking on Refresh button in the browser.
Now I did:
afterSubmit: function(response, postdata){
window.location.reload();
return [true, 'ok'];
}
I don't really like this solution because the main aim of this function is to return array and i'm suppresses it when doing the reload.
Any other idea?
20:23 27/03/2012
tony
Sofia, Bulgaria
Moderator
posts 7007
Hello,
What about reloading the grid after delete and not the whole page.
$("#grid").trigger("reloadGrid"); – this reload the grid.
Also if you use build in delete dialog you can just set – reloadAfterSubmit : true.
Regards
00:22 28/03/2012
Yair Nevet
http://yairnevet.blogspot.com/
Member
posts 3
tony said:
Hello,
What about reloading the grid after delete and not the whole page.
$("#grid").trigger("reloadGrid"); – this reload the grid.
Also if you use build in delete dialog you can just set – reloadAfterSubmit : true.
Regards
Hi,
Look, the grid is reloaded the with new data but the icons are not change.
There is no way to "recalculate" the tree and show the right icons?
Yair