Hello there,
i have a view with 3 xamTreeGrids. And i have a function which is selecting a certain record in each of this trees and also expands the trees in such a way that one can see the selected record.
So far everything works perfectly fine. But if i close the root of such a selected record by pressing on the "-" in the view, searching again does not work properly, because the function is not able to expand the tree anymore.
It seems like pressing the "-" doesn't set IsExpanded to false, which my function is using to expand the tree before.
So my question is, how can I expand the tree again, after a user pressed the "-" in the code (/C#), because it looks like IsExpanded is still true?
Thanks in advance!
Hello Rene,
I have been investigating into this issue that you are seeing, and as of yet, I cannot seem to reproduce this behavior that you are seeing with the XamTreeGrid's record expansion. I have created a sample project with a single XamTreeGrid with a button that expands records in the grid programmatically. In doing this, I have been keeping an eye on the record's IsExpanded property, and it appears to always correctly reflect the IsExpanded state on my end.
I have attached the sample project I used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.
If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using. My test was performed using version 16.1.20161.2056 in Infragistics for WPF 2016 Volume 1.
If the project does show the product feature working correctly, this indicates a possible problem in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.
Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate Developer
Hello Andrew,
thank you for your answer! I've taken a look into your sample programm, but it is not exactly doing what i mean.
First of all: I'm using v15.2 at the moment.
Your programm works fine. But this also works in my programm. The problem i face is the following:
My tree:
What now happens is, that someone selects cchild2 in the gui, and presses a button to view it in the tree (which is not epxanded).
This record is than searched in the tree, and by record.parentrecord.isexpanded=true... child1 and root1 get expanded.
So far it woks fine. If you now press on the minus at root1, and search again for cchild2, nothing will get expanded anymore.
I will try to adapt your example to show you what I mean, but currently my time is very limited.
But it feels like pressing the minus at the root does something different to collapse the tree than seting isexpanded to false,
because when debuging this, it still says isexpanded=true - but actually it is not expanded.
Thank you for your afford!