There is one more issue - I try to create a generic function which would accept the row and column index and return the text displayed on the cell. I came up with
function GetTableControlCellValue(TableControl,RowNum,ColNum)
{
PropArray = new Array("ClrClassName", "WPFControlOrdinalNo");
ValuesArray = new Array("DataRow", RowNum);
var Row = TableControl.WPFObject("DataRow","",RowNum);
PropArray = new Array("ClrClassName", "WPFControlOrdinalNo");
ValuesArray = new Array("DataCell", ColNum);
var Col = Row.FindChild(PropArray, ValuesArray, 5);
return Col.WPFControlText;
}
This works ONLY IF I don't rearrange the rows (by sorting) or columns (by dragging the column headers and repositioning them). How to overcome this issue - i.e. have a way to get me the cell text even if the table rows and columns are reordered?