Forum Discussion
mrezahoseini
12 years agoContributor
i have enterd this code in my program, it didn't work."error log:"rows can not find"
bankingWinUI = Aliases.BankingWinUI;
tableLayoutPanel = bankingWinUI.frmUserSearch.tableLayoutPanel1;
Grid =tableLayoutPanel.entityDataGridView1.dgvMain;
var Driver = DDT.ExcelDriver("C:\\Add-Modireyate-Gorohha.xls", "Sheet1");
RowIndex = FindRow (Grid, 3, Driver.Value(0));
DDT.CloseDriver(Driver.Name);
if (RowIndex >= 0)
Grid.ClickCell (RowIndex, "F'E");
else
Log
.Error("Row was not found.");
function FindRow (Grid, ColumnId, Value)
{
for (var i=0; i<Grid.RowCount; i++)
if (Grid.Text.OleValue(i, ColumnId) == Value){
return i;
}
return -1;
}