Edit: Well, smartbear threw all of that away. Have to retype...
Agreed cunderw
Off the top of my head I'd do something like*:
var columnoneitems = grid.FindAllChildren(columnoneindex, columnonesearchtext).toArray();
var columntwoitems = grid.FindAllChildren(columntwoindex,columntwosearchtext).toArray();
//columnthreeitems etc.
var iFoundTheRow = false;
var theRowIs = -1;
var i = 0;
var j = 0;
//you can probably improve this. You just need an efficient way to find the intersect of the arrays. There should be only one rowindex that exists in all the arrays
while(i<columnoneitems.length && iFoundTheRow==false)
{
while(j<columntwoitems.length&& iFoundTheRow==false)
{
if(columnoneitems[I].RowIndex = columntwoitems[j].RowIndex)
{
iFoundTheRow = true;
theRowIs = columnoneitems[I].RowIndex
}
j++
}
I++;
}
if(iFoundTheRow)
{
var theItem = grid.FindChild(rowindex,clickcolumnindex,clickfindtext)
if(theItem.Exists)
{
theItem.Click();
}
else
{
Log.Error("Item is having an existential crisis");
}
}
else
{
Log.Error("No such Row found");
}