Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
185
Context menu in xamTreeGrid not working correctly after expanding and collapsing all xamTreeGrid records
posted

Hi,

i have a question regarding the xamtreegrid in combination with the context menu. I have created a context menu for the different elements in the tree.

Thererore, if i click on such a element i get the element with the GetClickedElements() method in the opening event and according to the specific

element i change the visibilies of the different context menu items. This works pretty fine for me. Additionally if i do not click on a specific element (click on the white background of the xamTreegrid Control => GetClickedElements() returns zero clicked elements), i show different context menu items for the tree. 

The main problem now is, if i expand all records in the tree with xTree.Records.ExpandAll(true) and the collapse all records with xTree.Records.CollapseAll(true), the context menu does not work correctly. Now if i click only into the white tree view control and not on a specific field the GetClickedElements() method in the context menu opening window returns now the element that was shown at this position after all records were expanded! So maybe there is a problem inside the xTree.Records.CollapseAll(true).

So how can i refresh the tree after collapsing all records in order to avoid this problem? Or are there other solutions?

Many thanks in advance!

BR Rene

Parents Reply Children
No Data