MSAA RowHeader Role

Ask general questions here.
Posts: 357
Joined: Sun Dec 07, 2008 11:14 pm
Location: Dublin, Ireland

MSAA RowHeader Role

Post by atom » Tue Feb 23, 2010 12:50 pm


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.


User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA

Re: MSAA RowHeader Role

Post by Support Team » Tue Feb 23, 2010 2:09 pm

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,
Ranorex Team