I tried the code in Retain expanded/selected state in hierarchy on rebind to save the state of grid as expanded/collapse. But I have another problem, every time I click on edit command item in detail 3 the other command item for detail 2 and master table also changes. Same goes to detail 2, every time i click on edit command item in detail 2 the command item master table also changes.
Please see the attached screenshots Before and After clicking the edit command item.
Below is my C# code for customizing the visibility of command items.
Please disregard my problem below. I already figured it out why is the master table command items changes, every time i click on edit in any detail table.