'To check if the value exists in the grid cell
' p_value is the value which you need to check
' grid is the grid in which you need to check
' colid is the ID (string) or index (int) of the column in which you need to check
' you can get the function GetCellValue () in my previous post "TestComplete: To get cell value using Row number and Column ID"
'This function will return 1 if it founds p_value in any of the cell in grid colid column or else will return 0 if does not found the p_value
function value(p_value, grid, colid)
value = "0"
for row = 0 to grid.rows.count -1
if GetCellValue(grid,row,colid) = CStr(p_value) then
value = "1"
end If
Next
End Function
No comments:
Post a Comment