Hi,
I'm trying to use Microsoft UIA to show and hide fields on the UltraGrid.
I can show the field chooser (by simulating a mouse click on the field chooser button). But I am having trouble retrieving the AutomationElement for the field chooser window.
The problem is that it doesn't appear in the Automation Elements Tree. Neither if I try viewing the tree in Visual UI Automation Verify or if I try and find the field chooser using UIA functions.
If I use focus mode to find the control from the Visual UI Automation Verify tool then it shows it on the tree, under the same form as the grid.
Do you have any idea how to access the field chooser using UIA?
Thanks in advance.
Hello,
The UltraGridColumnChooser is displayed on a separate form that is owned by the same form as the grid itself. In my test sample, Inspect.exe shows the AutomationElement for the 'Field Chooser" as the first child of the main form. Hopefully this will help you gain access to the column chooser.
Let me know if you have further questions.
Chris
Ah, very interesting. I created a small test sample as you had, and I saw the same behaviour as you.
Then I tried to make another sample, which was similar to my application and have managed to replicate the behaviour I saw.
If I make an MDI parent form, which has an MDI child form which contains an UltraGrid and show the field chooser, then the field chooser doesn't show up on the automation elements tree (unless I manually find it using hover/focus mode).
See attached sample. Click on one of the grid cells to show the field chooser.