Event.Form.MainGrid.Results
.Results returns the grid as an object. This object contains all the rows and columns that are present in the grid only. From this data table object, you can interact with the grid data getting and setting values.
Note: To get and interact with all possible rows and columns in the dataset, you will need to use Script.GetDataTable().
Applies To
Properties and Methods
Properties
Methods
- .AddBooleanColumn(Name)
- .AddDateTimeColumn(Name)
- .AddDecimalColumn(Name)
- .AddIntegerColumn(Name)
- .AddRow([IDColumn])
- .AddStringColumn(Name)
- .GetMaximumDateTime(ColName)
- .GetMaximumDecimal(ColName)
- .GetMaximumInteger(ColName)
- .GetMinimumDateTime(ColName)
- .GetMinimumDecimal(ColName)
- .GetMinimumInteger(ColName)
- .GetRow(X)
- .RemoveRow(Row)
- .SetNextIDValue(IDColumn, Row)
Available
The .Results property is available in:
- 15.03.014
- All newer builds
Note: The .Results property and all sub-classes, properties, and methods are only available in Form Layout scripts.
Type
DataTable
Syntax
Event.Form.MainGrid.Results;
Parameters
None
Example
//--The following code grabs the grid object for the main grid on any form layout
Event.Base();
var lpMainGrid = Event.Form.MainGrid;
var loMainGrid = lpMainGrid.Results;
/* Expected result:
User will not see anything, but the variable loMainGrid now contains the entire grid to use in further script lines
This would not usually be used by itself, but would be the first step in the process of working with the grid.
*/