Page 1 of 1

MSAA RowHeader Role

Posted: Tue Feb 23, 2010 12:50 pm
by atom
Hiya

For a grid control (Dev Express XtraGrid), via MSAA I see each column exposed using MSAA Role = RowHeader. So in spy i get the following heirarachy:

- Table
- - Cell (row header)
- - Cell (row header)
- - etc.
- - Row
- - Row
- - etc.

My question is how can I access the row header cells via the Ranorex.Table class, as they seem to not be mapped to any property of this class, the reason i ask is that these row headers have a default sort action on them i wish to call.

Regards

Re: MSAA RowHeader Role

Posted: Tue Feb 23, 2010 2:09 pm
by Support Team
Hi atom!
I`m not sure that I understood your question correctly!

If you want to get all cell elements underneath the XtraGrid Table you can call e.g. FindChildren() like:
// sample code from DevExpress XtraGrid main sample
Ranorex.Table tableTable = "/form[@controlname='frmMain' and @title~'^XtraGrid\\ Features\\ Demo\\ \\(C']/container[@controlname='panelControl1']/container[@controlname='gcContainer']/container[@controlname='TableView']/element[@controlname='gridControl1']/table[@accessiblerole='Table']";

IList<Ranorex.Cell> cells = tableTable.FindChildren<Ranorex.Cell>();
You can then use the Accessible.DoDefaultAction method on the individual cells.

Best regards,
Christian
Ranorex Team