Forum Discussion

kdb's avatar
kdb
Senior Member
7 years ago

Problems getting cells from custom WPF datagrid

I have an application that derives from datagrid and I would like to be able to use the grid functionality to access the contents.  I have defined the alias in the Object Mapping, and the wColumnCount and wRowCount return the correct values, but wColumn always returns nothing and wValue also returns nothing.  The column headers have been customized to be a grid instead of just text, so I suspect I will have to somehow tell TestComplete how to find the header text, but I don't know how.  As for the cell contents, the one I am looking at initially is a DataGridCell whose contents are a TextBlock wrapped in a Grid, so I would expect it to be able to extract the value, but in the Evaluation Dialog, I get nothing.  If in a script I get the cell and call ToString() on it, I get an error that the type of the specified cell is not supported.

 

What do I need to do to make these grids be recognized fully by TestComplete?