Table of Contents

Class GuiTable

Namespace
SapGui.Wrapper
Assembly
SapGui.Wrapper.dll

Wraps a classic ABAP-rendered SAP GUI table control (GuiTable). For ALV grids use GuiGridView instead.

public class GuiTable : GuiComponent
Inheritance
GuiTable
Inherited Members

Properties

ColumnCount

Number of columns.

public int ColumnCount { get; }

Property Value

int

CurrentCellColumn

Key (column name) of the currently focused cell. Returns an empty string when no cell is focused.

public string CurrentCellColumn { get; }

Property Value

string

CurrentCellRow

Row index (0-based) of the currently focused cell. Returns -1 when no cell is focused.

public int CurrentCellRow { get; }

Property Value

int

FirstVisibleRow

Index of the first visible row in the current scroll position (0-based).

public int FirstVisibleRow { get; }

Property Value

int

RowCount

Total row count (may include off-screen rows).

public int RowCount { get; }

Property Value

int

VisibleRowCount

Number of rows currently visible in the table's viewport.

public int VisibleRowCount { get; }

Property Value

int

Methods

GetCellValue(int, int)

Returns the raw text value of a cell. Row is 0-based. Column is 0-based.

public string GetCellValue(int row, int column)

Parameters

row int
column int

Returns

string

GetVisibleRows()

Reads all currently rendered (visible) rows into a list of string arrays. Only the rows in the current viewport are returned; SAP does not populate off-screen rows in the COM tree.

public List<string[]> GetVisibleRows()

Returns

List<string[]>

ScrollToRow(int)

Scrolls the table so that row is the first visible row. The position is clamped to RowCount − VisibleRowCount (SAP's scrollbar maximum).

public void ScrollToRow(int row)

Parameters

row int

SelectRow(int)

Selects a row (0-based).

public void SelectRow(int row)

Parameters

row int

SetCellValue(int, int, string)

Sets a cell text value (if the cell is editable).

public void SetCellValue(int row, int column, string value)

Parameters

row int
column int
value string