DataGrid Class
Package: GHIElectronics.Endpoint.UI
Namespace: GHIElectronics.Endpoint.UI
Simple grid of text cells (standard WPF widget name; TinyCLR-shape API). Call DataGrid.SetSize to allocate rows and columns, then DataGrid.SetCell to fill each cell.
public class DataGrid : Widget
Constructors
DataGrid(Widget parent)
public DataGrid(Widget parent)
Create a data grid inside parent.
| Parameter | Type | Description |
|---|---|---|
parent | Widget | Containing widget. |
Methods
SetCell(int row, int column, string text)
public void SetCell(int row, int column, string text)
Set the text in a single cell.
| Parameter | Type | Description |
|---|---|---|
row | int | 0-based row index. |
column | int | 0-based column index. |
text | string | Cell contents; null is treated as empty. |
SetColumnWidth(int column, int px)
public void SetColumnWidth(int column, int px)
Set a single column's width in pixels.
| Parameter | Type | Description |
|---|---|---|
column | int | 0-based column index. |
px | int | Width in pixels. |
SetSize(int columns, int rows)
public void SetSize(int columns, int rows)
Allocate the grid dimensions. Must be called before DataGrid.SetCell.
| Parameter | Type | Description |
|---|---|---|
columns | int | Number of columns. |
rows | int | Number of rows. |