show / hide menu

GridCopyData

This function is used to copy data from one grid to another.

Syntax:

GridCopyData (from grid, to grid, columns, append rows)

Arguments:

From grid: Source Grid name. (The grid from which data is to be copied. It can either be a table view control or dynamic grid control).

To grid: Destination Grid name (the grid to which data is being copied. It can either be table view control or dynamic grid control).

Columns: Source column index and destination column index separated by colon (:) and multiple column pair separated by semicolon (;). It is not mandatory to be in the same order e.g.: 1:1; 2:3; 3:2.

Append rows: Whether to append the results to destination control results. This is a Boolean argument. If true, it will append the data of first grid to the data of 2nd grid. Else it replaces the values of destination grid by the values of source grid.

STEPS TO FOLLOW

  1. Drag and drop the dynamic grids.
  2. Configure the data sources. Run the Select command in any of the triggers.
  3. Write the rule for copying as in the below image,

This will copy data from source grid to destination grid by mapping first column of source grid to first column of destination grid, second column of source grid to third column of destination grid and so on.

4 , Check in the form.

Form Preview

After running the GridCopy() function,