public static void SetBatchValues(this GuiTableControl table, List <List <Tuple <int, string> > > Values, Action <int> process = null) { var component = table as GuiComponent; while ((component is GuiSession) == false) { component = component.Parent; } var session = component as GuiSession; var id = table.Id; var pageSize = table.VerticalScrollbar.PageSize; int row = 0; int range = pageSize - 1; for (int i = 0; i < Values.Count; i++) { if (row != 0 && row % range == 0) { table.VerticalScrollbar.Position += pageSize; table = session.FindById <GuiTableControl>(id); //table = SAPTestHelper.Current.PopupWindow.FindByName<GuiTableControl>("SAPLALDBSINGLE"); } if (i < range) { for (int j = 0; j < Values[i].Count; j++) { var rowData = Values[i]; table.GetCell(row, rowData[j].Item1).Text = rowData[j].Item2; } } else { for (int j = 0; j < Values[i].Count; j++) { var rowData = Values[i]; table.GetCell(row % range + 1, rowData[j].Item1).Text = rowData[j].Item2; } } row++; if (process != null) { process(i + 1); } } }
public string Table_GetCellValue(string TableID, int rowIndex, int columnIndex) { GuiSession SapSession = getCurrentSession(); GuiTableControl tblControl = (GuiTableControl)SapSession.ActiveWindow.FindById(TableID, "GuiTableControl"); tblControl.SetFocus(); return(tblControl.GetCell(Convert.ToInt32(rowIndex), Convert.ToInt32(columnIndex)).Text); }
public ClassVariableColumnIndexDefinition(GuiTableControl table, ClassVariableColumnNameDefinition definition) { for (int i = 0; i < table.Columns.Count; i++) { GuiVComponent component = table.GetCell(i, 0); string columnName = component.Name; if (columnName.Equals(definition.GetTypingColumn())) { typingIndex = i; } if (columnName.Equals(definition.GetTypingColumn())) { typeIndex = i; } if (columnName.Equals(definition.GetTypingColumn())) { visibilityIndex = i; } if (columnName.Equals(definition.GetTypingColumn())) { nameIndex = i; } } }
private void SetCell(int columnIndex, string value) { GuiTextField field = table.GetCell(rowIndex, columnIndex) as GuiTextField; field.Text = value; }
public static T GetCell <T>(this GuiTableControl Table, int row, int col) where T : class { return(Table.GetCell(row, col) as T); }