Yes, I tried this. Writes me an error in this line of Table = Grid.DataSource.Tables.Item (0); ... DataSource.Tables is null or not object.. :(.
My edit code:
function Main3 ()
{
var p, Grid, Table, RowId, ColumnName, Value;
Grid = ShellForm.MainWorkspace.BookWorkingMainView.m_tableLayoutPanelMain.m_panelLeft.LeftWorkspace.TableLayoutDynamicView.m_tableLayoutPanel.BoundedDynamicViewPanel.UltraGridViewControl.m_ultraGrid;
Table = Grid.DataSource.Tables.Item(0);
// Locate row by cell value
ColumnName = 2;
Value = "1";
RowId = FindRow (Table, ColumnName, Value);
if (RowId >= 0)
Log.Message ("Index of the found data table row: " + RowId);
else
Log.Error ("The '" + ColumnName + "' column of the data table does not contain the value of '" + Value + "'.");
}
function FindRow (Table, ColumnName, Value)
{
var View = Table.DefaultView;
View.Sort = ColumnName;
return View.Find (Value);
}