Syntax for a single data item in a DataWindow

Description

A DataWindow data expression accesses a single data item when you specify its row and column number.

Syntax

dwcontrol.Object.Data {.buffer } {.datasource } [ rownum, colnum ] 

Parameter

Description

dwcontrol

The name of the DataWindow control or child DataWindow in which you want to get or set data.

buffer (optional)

The name of the buffer from which you want to get or set data. Values are:

  • Primary – (Default) The data in the primary buffer (the data that has not been deleted or filtered out).

  • Delete – The data in the delete buffer (data deleted from the DataWindow control).

  • Filter – The data in the filter buffer (data that was filtered out).

datasource (optional)

The source of the data. Values are:

  • Current – (Default) The current values in the DataWindow control.

  • Original – The values that were initially retrieved from the database.

rownum

The row number of the desired item.

colnum

The column number of the desired item.

The row and column numbers must be enclosed in brackets and separated by commas.

Return value

The datatype of the expression is Any. The expression returns a single item in the DataWindow control. Its datatype is the datatype of the column.

Examples

These expressions both refer to a single item in row 1, column 2. The expressions access current data in the primary buffer:

dw_1.Object.Data[1,2]

dw_1.Object.Data.Primary.Current[1,2]

This statement changes the value of the original data to 0 for the item in row 1, column 2 in the Filter buffer. Column 2 holds numeric data:

dw_1.Object.Data.Filter.Original[1,2] = 0