Skip to main content

TablePanel.Rows Property

Provides access to the collection of the panel’s rows (TablePanelRow).

Namespace: DevExpress.Utils.Layout

Assembly: DevExpress.Utils.v23.2.dll

NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core

Declaration

[DXCategory("Layout")]
public TablePanelRowCollection Rows { get; }

Property Value

Type Description
DevExpress.Utils.Layout.TablePanelRowCollection

A collection of TablePanelRow objects.

Remarks

Use the TablePanel.Columns and TablePanel.Rows properties to add columns and rows to the panel.

The main settings of Table Panel rows include:

Example

The following example adds rows and columns to a TablePanel, and then places a button to the panel’s top-left cell.

The created rows and columns are of different size types, as demonstrated in the image below.

image

using DevExpress.Utils.Layout;

tablePanel1.Columns.Clear();
tablePanel1.Columns.Add(new TablePanelColumn(TablePanelEntityStyle.AutoSize, 0));
tablePanel1.Columns.Add(new TablePanelColumn(TablePanelEntityStyle.Absolute, 40));
tablePanel1.Columns.Add(new TablePanelColumn(TablePanelEntityStyle.Relative, 2));
tablePanel1.Columns.Add(new TablePanelColumn(TablePanelEntityStyle.Relative, 5));

tablePanel1.Rows.Clear();
tablePanel1.Rows.Add(new TablePanelRow(TablePanelEntityStyle.AutoSize, 0));
tablePanel1.Rows.Add(new TablePanelRow(TablePanelEntityStyle.Absolute, 50));
tablePanel1.Rows.Add(new TablePanelRow(TablePanelEntityStyle.Relative, 1));
tablePanel1.Rows.Add(new TablePanelRow(TablePanelEntityStyle.Relative, 3));

tablePanel1.Controls.Add(simpleButton1);
tablePanel1.SetCell(simpleButton1, 0, 0);
See Also