cancel
Showing results for 
Search instead for 
Did you mean: 

find a value in cells of datagridview

SOLVED
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
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
________________________
Vote up helpful replies.
Accept this reply if you think it's the best solution to your question.

Join the September Hub-bub to show off, learn and win
Contributor

Re: find a value in cells of datagridview

Thank you very much indeed. my problem is solved.

mahnazrezahoseini
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?

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
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
________________________
Vote up helpful replies.
Accept this reply if you think it's the best solution to your question.

Join the September Hub-bub to show off, learn and win
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
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
________________________
Vote up helpful replies.
Accept this reply if you think it's the best solution to your question.

Join the September Hub-bub to show off, learn and win
Contributor

Re: find a value in cells of datagridview

Thank you very much indeed. my problem is solved.

mahnazrezahoseini
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
Extensions available
New Here?
Join us and watch the welcome video:
Top Kudoed Authors
Join the September Hub-bub to show off, learn and win