cancel
Showing results for 
Search instead for 
Did you mean: 

find a value in cells of datagridview

SOLVED
Highlighted
Contributor

find a value in cells of datagridview

Hello,
I would like to retrieve a value of a cell (Search) in DataGridview
I used this manual too : http://support.smartbear.com/viewarticle/63253/

 

but unfortuantly, when I used the sample code of this manual, I saw that there is no "wValue" property and also my datagridview hasn't got this property.

 

what shall I do?

 

this is my sample code : 

 

 

function Select()
{

var p, Grid, RowIndex;

Grid = Aliases.BankingWinUI.frmIssuer.tableLayoutPanel1.entityDataGridView12.dgvMain;  // this is the path of my datagridview from namemapping


RowIndex = FindRow (Grid, "عنوان", "بانک دی");
if (RowIndex >= 0)
Grid.ClickCell (RowIndex, "عنوان");
else
Log.Error ("Row was not found.");

}


function FindRow (Grid, ColumnId, Value)
{

for (var i=0; i<Grid.RowCount; i++)

if (Grid.wValue(i, ColumnId) == Value) //can not compile this line, not recognize
return i;

return -1;
}

 

 

 

This is the snapshot of my datagridview's properties

 

 

 

Untitled.png

 

mahnazrezahoseini
2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Moderator

Re: find a value in cells of datagridview

Your grid appears to be based on the standard .NET DataGridView. So you need to add the the grid's class name (Kishware.UI.Windows.Forms.EntityDataGridView) to Tools > Current Project Properties > Object Mapping > Microsoft Controls > WinForms > DataGridView. This will enable advanced recording and playback using the wValue, ClickCell and other properties and methods.


Helen Kosova
SmartBear Technical Writer
________________________

 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!

View solution in original post

Highlighted
Contributor

Re: find a value in cells of datagridview

Thank you very much indeed. my problem is solved.

mahnazrezahoseini

View solution in original post

8 REPLIES 8
Highlighted
Valued Contributor

Re: find a value in cells of datagridview

what is your grid?

is it compiled as said in TC documentation?

Highlighted
Contributor

Re: find a value in cells of datagridview

Excuse me, what do you mean?

 

I used f10 for compiling and also some breakpoints have been set in my program.

 

Thanks for your attention

mahnazrezahoseini
Highlighted
Moderator

Re: find a value in cells of datagridview

Hi mahnazreza,

What is your grid's class name (the ClrFullClassName property)?


Helen Kosova
SmartBear Technical Writer
________________________

 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!
Highlighted
Contributor

Re: find a value in cells of datagridview

Hello

 

This property has this value : "Kishware.UI.Windows.Forms.EntityDataGridView"

 

Thanks for your attention

 

Regards

 

 

mahnazrezahoseini
Highlighted
Moderator

Re: find a value in cells of datagridview

Your grid appears to be based on the standard .NET DataGridView. So you need to add the the grid's class name (Kishware.UI.Windows.Forms.EntityDataGridView) to Tools > Current Project Properties > Object Mapping > Microsoft Controls > WinForms > DataGridView. This will enable advanced recording and playback using the wValue, ClickCell and other properties and methods.


Helen Kosova
SmartBear Technical Writer
________________________

 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!

View solution in original post

Highlighted
Contributor

Re: find a value in cells of datagridview

Thank you very much indeed. my problem is solved.

mahnazrezahoseini

View solution in original post

Highlighted
Occasional Contributor

Re: find a value in cells of datagridview

Where is tool option
Community Hero

Re: find a value in cells of datagridview

It's the "Tools" menu on the TestComplete menu bar

 

 


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available