Class GuiGridView
Wraps an ALV Grid View control (GuiGridView). This is the most common grid type in modern SAP transactions.
public class GuiGridView : GuiComponent
- Inheritance
-
GuiGridView
- Inherited Members
Properties
ColumnNames
Column names/keys available in this grid.
public IReadOnlyList<string> ColumnNames { get; }
Property Value
CurrentCellColumn
Column key of the currently focused cell.
public string CurrentCellColumn { get; }
Property Value
CurrentCellRow
Row index (0-based) of the currently focused cell.
public int CurrentCellRow { get; }
Property Value
FirstVisibleRow
Index of the first row currently visible in the viewport (0-based).
public int FirstVisibleRow { get; }
Property Value
RowCount
Total number of data rows.
public int RowCount { get; }
Property Value
SelectedRows
Returns the list of currently selected row indices (0-based).
public IReadOnlyList<int> SelectedRows { get; }
Property Value
VisibleRowCount
Number of rows currently visible in the viewport.
public int VisibleRowCount { get; }
Property Value
Methods
ClickCell(int, string)
Clicks a cell (e.g. to follow a tree-node or hyperlink).
public void ClickCell(int row, string column)
Parameters
DoubleClickCell(int, string)
Double-clicks a cell.
public void DoubleClickCell(int row, string column)
Parameters
GetCellCheckBoxValue(int, string)
Returns the boolean value of a checkbox-type cell.
public bool GetCellCheckBoxValue(int row, string columnName)
Parameters
Returns
GetCellTooltip(int, string)
Returns the tooltip text for the specified cell.
public string GetCellTooltip(int row, string columnName)
Parameters
Returns
GetCellValue(int, string)
Returns the cell value at (row, columnName).
public string GetCellValue(int row, string columnName)
Parameters
Returns
GetRows(IEnumerable<string>?)
Reads all rows for the specified columns into a list of dictionaries. Scrolling is NOT performed automatically.
public List<Dictionary<string, string>> GetRows(IEnumerable<string>? columns = null)
Parameters
columnsIEnumerable<string>
Returns
GetSymbolsForCell(int, string)
Returns the symbol/icon key for an icon-type column cell.
public string GetSymbolsForCell(int row, string columnName)
Parameters
Returns
PressEnter()
Confirms a cell edit by sending Enter to the grid.
public void PressEnter()
PressToolbarButton(string)
Presses a toolbar button by its function code string.
public void PressToolbarButton(string functionCode)
Parameters
functionCodestring
SelectAll()
Selects all rows.
public void SelectAll()
SelectRow(int)
Selects a single row (0-based).
public void SelectRow(int row)
Parameters
rowint
SetCellValue(int, string, string)
Sets the cell value at (row, columnName).
public void SetCellValue(int row, string columnName, string value)
Parameters
SetCurrentCell(int, string)
Moves focus to the specified cell. Must be called before right-clicking, reading a tooltip, or reading a checkbox-type cell reliably.
public void SetCurrentCell(int row, string columnName)