So this is very difficult to replicate but I thought I'd mention it anyway.
Basically, I have a 3 tier hierarchy. There's only about 10 parent records with four 2nd level records each and varying amounts of 3rd level records. I expand almost all of them in the InitializeRecord event.
Now when UseNestedPanels = False, the grid randomly hangs (occasionally on scrolling but mostly on expanding/unexpanding child records) and after some time, one of those dreaded ContextSwitchDeadlock exceptions is thrown. I then have to kill the whole application.(If I comment out the code in InitializeRecord, it seems to take a lot longer to hang but it still does eventually after having expanded everything).
If, however, UseNestedPanels = True, this doesn't seem to happen. Any ideas?
I will attempt to create a sample but I'm not sure if it will be easily replicable.
It must be something to do with my grid layout, I think.
I managed to create a sample that seems to hang somewhat consistently when you scroll right to the bottom (right right to the bottom). I'm not getting the ContextSwitchDeadlock message though so I'm not sure if this is quite the same issue.
And I could only replicate this by copying my field layouts and data structure so any help with what I'm doing wrong there would be appreciated.
Again, if UseNestedPanels = true, it doesn't seem to hang at all (but obviously this impacts performance so I'd prefer not to set this if I don't have to).
If it doesn't hang the first time, scroll all the way to the top then all the way to the bottom again. Do this a few times.
I'm using 9.2, by the way.
Thanks in advance.
Hello,
Thank you for your sample. I noticed this issue with the build you are using (2032), however I believe a similar issue was already reported and resolved. I am not able to replicate it using the latest service release for 9.2, so I would recommend upgrading to it and re-testing this.
Thanks for the quick reply. Not sure when we'll be able to upgrade at this stage (didn't realise there was a later service release) but will check it out when we do.
Thanks again!
As a side note, when you upgrade, you can use the XamDataGrid.Records.ExpandAll(...) method to expand all of the records at once.