TableView Component

Use the TableView component to display the contents of a data set. When using the TableView to bind data to a control on a Windows form or Application Bar, be sure to add the TableView to the Windows form design page. For more information, see Updating Controls on WinForms.

When you add this component to an automation, the system places it on the Global tab of the component tray. For more information, see Adding Global Components to an Automation. This component must be global to be referenced by other automations in the project.

Specific properties, methods, and events for the component are listed below. For more information, see General Component Properties, Methods, and Events.

 

Properties

Property

Description

AllowDelete

Sets or gets a value that indicates whether deletes are allowed.

AllowEdit

Gets or sets a value that indicates whether edits are allowed.

AllowNew

Gets or sets a value that indicates whether the new rows can be added by using the AddNew method.

ApplyDefaultSort

Indicates whether to apply the default sort of the dataset if the Sort property is not set.

Count

Returns the total number of items currently in the view.

DataViewManager

Returns a pointer back to the DataViewManager that owns this dataset (if any).

Filter

Enter the expression you want to use to create a subset of the query data. Use standard "Where-clause" syntax to enter the expression. Here is an example:

Employee = @ID

where @ represents a variable input for the filter.

Filtered

Returns True if the view is filtered. (Boolean)

IsEmpty

Returns True if the table does not contain any rows. (Boolean)

IsInitialized

Gets a value that indicates whether the component is initialized.

Position

Index of the current row in the table.

RowCount

Number of rows in the table.

RowFilter

Enter the expression you want to use to set which rows are viewed.

Sort

Gets or sets the sort column or columns, and the sort order for the view.

TableProvider

Browse this field to display a list of all of the data sets available in the solution. Here is an example:

 

Events

Event

Description

Initialized

This event occurs after Initialization has finished.

ListChanged

This event occurs after the data in the table has changed.

LoopBroken

This event occurs when the Break event for the Loop method has been triggered.

LoopCompleted

This event occurs when the Completed event for the Loop method triggers.

PositionChanged

This event occurs when the TableView record pointer moves.

RowYielded

This event occurs when the RowYielded event for the Loop method triggers.

 

Methods

Method

Description

Parameters

Return Type

AddNew

Adds a new row to the TableView.

None

DataRowView

ApplyFilter

Limits the output of the TableView to those records that satisfy the Filter expression.

None

Void

BeginInit

Starts the initialization of a TableView that is used on a form or used by another component. The initialization occurs at runtime.

None

Void

ClearFilter

Clears the filter applied to the TableView data and refreshes the view with all data.

None

 Void

CopyTo

Copies items into an array. Only for Web Forms Interfaces.

Array array, Inr32 index

Void

Current

Outputs data for the current row.

None

Table data

Delete

Deletes a row at the specified index.

Int32 index

Void

EndInit

Ends the initialization of a TableView that is used on a form or used by another component. The initialization occurs at runtime.

None

Void

Find

Finds a row in the TableView by the specified sort key value.

Object key

Int32

Find

Finds a row in the TableView by the specified sort key values.

Object[] key

Int32

FindRows

Returns an array of DataRowView objects whose columns match the specified sort key value.

Object key

DataRowView[]

FindRows

Returns an array of DataRowView objects whose columns match the specified sort key value.

Object[] key

DataRowView[]

First

Moves the TableView record pointer to the first row in the table. This method not only moves the record pointer but also outputs the data columns for the record.

None

Table data

GetColumnValue

Gets a list of all  values for a specific column.

TableViewColumn column

Object[]

GetCurrentValue

Gets the value of the current row at the specified column index.

Int32 column index

Object

GetCurrentValue

Gets the value of the current row for the specified column.

 

TableViewColumn column

Object

GetEnumerator

Gets an enumerator for this TableView.

None

List

GetItem

This is a .NET method which is reserved for system use.

Int32 recordIndex

DataRowView

GetService

Gets the implementer of the IServiceProvider. (Inherited from the MarshalByValueComponent.)

Type service

Object

GetValue

Gets the value at a particular row index and column index.

Int32 rowIndex, Int32 columnIndex

Object

GetValue

Gets the value at a particular row index and column.

Int32 rowIndex, TableViewColumn column

Object

Last

Moves the TableView record pointer to the last row in the table. This method not only moves the record pointer but also outputs the data columns for the record.

None

Table data

Loop

Use this method to output each record of the TableView one row at a time. This method contains output data points for each table column.

None

Void

Next

Moves the TableView record pointer to the next row in the table. This method not only moves the record pointer but also outputs the data columns for the record.

None

Table data, Boolean

Previous

Moves the TableView record pointer to the previous row in the table. This method not only moves the record pointer but also outputs the data columns for the record.

None

Table data, Boolean

SetItem

.NET method reserved for system use.

Int32 recordIndex, DataRowView value

Void

ToTable

Creates and returns a new TableView based on rows in an existing TableView .

None

DataTable

ToTable (1 param)

Creates and returns a new TableView based on rows in an existing TableView.

String tableName

DataTable

ToTable (2 params)

Creates and returns a new TableView based on rows in an existing TableView.

Boolean distinct, String[] columnNames

DataTable

ToTable (3 params)

Creates and returns a new TableView based on rows in an existing TableView.

 

String tableName, Boolean distinct, String[] columnNames

DataTable

 


Privacy | Trademarks | Terms of Use | Feedback

Updated: 01 December 2021

© 2016 - 2021 Pegasystems Inc.  Cambridge, MA All rights reserved.

 

OpenSpan data classification label