# Table

![](https://gblobscdn.gitbook.com/assets%2F-M-L9CGkriEo1_2PfJzA%2F-M5_gIkSrRoHNjhwXgix%2F-M5_p3NpduwAf8xFeA2q%2FSAP_%D1%82%D0%B0%D0%B1%D0%BB%D0%B8%D1%86%D0%B0_%D0%B8%D0%BA%D0%BE%D0%BD%D0%BA%D0%B0.png?alt=media\&token=8d8f8be3-791c-4ea9-b211-45f59fcf755b)

Element which gets reference to UI component Table.

![](https://1755238209-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNnEkyZmLMSWTDXxpygbG%2Fuploads%2Fgit-blob-7dde6e4c30b93a46880c3ca52d77b2b92ada410c%2FSAP_table.png?alt=media)

Properties:

Element which gets reference to UI component Table.

Properties:

* Control ID: \[String] Control ID
* Control: \[LTools.SAP.Model.SAPUIItem] Control reference
* Table: \[LTools.SAP.Model.SAPUIGrid] Variable that stores table reference
* Full read: Full table data read including checkboxes, color etc.
* Variable: \[LTools.SAP.Model.SAPUIGrid] Variable to store table reference
* Cells: \[List\<List\<LTools.SAP.Model.SAPUIGridCell>>] Cell values
* Columns: \[List\<LTools.SAP.Model.SAPUIGridColumn>] Table columns info
* Selected rows: \[List\<int>] Selected rows indexes
* Selected cells: \[Dictionary\<int, string>] Selected cells array
* Select rows: \[List\<int>] Rows indexs to select
* Select cells: \[List\<string>] Cells aray to select
* Click: \[Dictionary\<int, string>] Cell click
* Double click: \[Dictionary\<int, string>] Cell double click
* Toolbar button: \[String] Click toolbar button by ID
* Time-out\*: \[Int32] Maximum waiting time for process completion (ms)

LTools.SAP.Model.SAPUIGrid:

* \[SAPFEWSELib.ISapGridViewTarget] Element - Element reference;
* \[String] Id - Element ID;
* \[List\<LTools.SAP.Model.SAPUIGridColumn>] Columns - Columns;
* \[List\<List\<LTools.SAP.Model.SAPUIGridCell>>] Cells - Cells;
* \[List\<int>] SelectedRows - Selected rows indexes;
* \[Dictionary\<int, string>] SelectedCells - Selected cells. Index, Column key;
* SelectCells(List cells - strings formatted "Row index, Column key" ("1, NAME")) - Select cells;
* SelectRows(List rows - row indexes) - Select rows;
* SetCurrentCell(int row - row index, string column - column key) - Select current cell;
* ClickCell(int row - row index, string column - column key) - Performs cell click;
* DoubleClickCell(int row - row index, string column - column key) - Performs cell double click;
* PressToolbarButton(string id - button ID) - Performs click on table toolbar button.

LTools.SAP.Model.SAPUIGridColumn:

* \[String] Key - Column key;
* \[String] Text - Column text.

LTools.SAP.Model.SAPUIGridCell:

* \[int] Row - Row index;
* \[String] Column - Column key;
* \[String] Text - Cell text;
* \[bool] IsChecked - Is cell checkbox checked;
* \[int?] Color - Cell color;
* \[int?] ListIndex - Selected item index.

```
C#
LTools.SAP.SapApp app = LTools.SAP.SapApp.Init(wf);
LTools.SAP.Model.SAPUIGrid tbl = app.Table("/app/con[0]/ses[0]/wnd[0]/usr/cntlIMAGE_CONTAINER/shellcont/shell/shellcont[0]/shell");
tbl.SelectRows(new List<int>() { 1 });

Python
app = LTools.SAP.SapApp.Init(wf)
tbl = app.Table("/app/con[0]/ses[0]/wnd[0]/usr/cntlIMAGE_CONTAINER/shellcont/shell/shellcont[0]/shell")
tbl.SelectRows(List[int]([ 1 ]))

JavaScript
var host = new _lib.Microsoft.ClearScript.HostFunctions();
var app = _lib.LTools.SAP.SapApp.Init(wf);		
var tbl = app.Table("/app/con[0]/ses[0]/wnd[0]/usr/cntlIMAGE_CONTAINER/shellcont/shell/shellcont[0]/shell");
var idx = host.newObj(_lib.System.Collections.Generic.List(_lib.System.Int32));
idx.Add(1);
tbl.SelectRows(idx);
```
