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
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.
Thank you very much indeed. my problem is solved.