projects/wms-framework/src/lib/models/controls/XamGridRow.ts
A class to represent a grid row
Properties |
|
Methods |
Accessors |
constructor(index: number, rowsManager: any, data: unknown)
|
Creates an instance of XamGridRow. |
Private _cellStyle |
Type : RuntimeStyleInfo
|
Default value : null
|
Property to set the cell style value |
Private _isSelected |
Default value : false
|
private property to hold the selection |
ParentRow |
Type : XamGridRow
|
Default value : null
|
Reference to parent row |
Protected _cells |
Type : CellBaseCollectionModel
|
Inherited from
RowBase
|
Defined in
RowBase:35
|
Internal cells collection |
DefaultDataObject |
Type : any
|
Default value : null
|
Inherited from
RowBase
|
Defined in
RowBase:127
|
Gets / sets the object that will be used to compare against an object in the AddNewRow to detect if the AddNewRow is dirty. |
Index |
Default value : -1
|
Inherited from
RowBase
|
Defined in
RowBase:97
|
Row index |
IsActive |
Type : boolean
|
Default value : false
|
Inherited from
RowBase
|
Defined in
RowBase:43
|
Determinate if the Row is Active |
onDemandData |
Type : any
|
Inherited from
RowBase
|
Defined in
RowBase:51
|
On demand function for row data resolving |
RowsManager |
Type : RowsManager
|
Inherited from
RowBase
|
Defined in
RowBase:71
|
Reference to the RowsManager |
SetSelected | ||||||
SetSelected(value: boolean)
|
||||||
sets the isSelected property silently
Parameters :
Returns :
void
|
key |
getkey()
|
Returns the Row's Key |
CellStyle | ||||||
getCellStyle()
|
||||||
Runtime style information for row |
||||||
setCellStyle(info: RuntimeStyleInfo)
|
||||||
Parameters :
Returns :
void
|
IsSelected | ||||||
getIsSelected()
|
||||||
Flag to determine if the row is selected
Returns :
boolean
|
||||||
setIsSelected(value: boolean)
|
||||||
Parameters :
Returns :
void
|
IsEditableOnAdd |
getIsEditableOnAdd()
|
Flag to determine if the row should enter edit mode on add
Returns :
boolean
|
import { RuntimeStyleInfo } from '../../basecomponentmodel/RuntimeStyleInfo';
import { RowBase } from './RowBase';
/**
* A class to represent a grid row
*
* @export
* @class XamGridRow
* @wType Infragistics.Controls.Grids.Row
*/
export class XamGridRow extends RowBase {
/**
* private property to hold the selection
*
* @private
* @type {boolean}
* @memberof XamGridRow
*/
private _isSelected = false;
/**
* Creates an instance of XamGridRow.
* @param {number} index
* @param {XamGridModel} gridComponent
* @param {*} data
* @memberof XamGridRow
*/
constructor(index: number, rowsManager: any, data: unknown) {
super(rowsManager);
this.Index = index;
this.Data = data;
}
/**
* Property to set the cell style value
*
* @private
* @type {RuntimeStyleInfo}
* @memberof XamGridRow
*/
private _cellStyle: RuntimeStyleInfo = null;
/**
* Returns the Row's Key
*
* @readonly
* @memberof XamGridRow
*/
get key() {
return `${this.Index}`;
}
/**
* Runtime style information for row
*
* @type {RuntimeStyleInfo}
* @memberof XamGridRow
*/
get CellStyle() {
return this._cellStyle;
}
set CellStyle(info: RuntimeStyleInfo) {
this._cellStyle = info;
this.ColumnLayout.Grid.gridComponentInstance?.cellChanged();
}
/**
* Flag to determine if the row is selected
*
* @memberof XamGridRow
*/
get IsSelected(): boolean {
return this._isSelected;
}
set IsSelected(value: boolean) {
if (this.ColumnLayout == null) {
return;
}
this._isSelected = value;
if (this._isSelected) {
this.ColumnLayout.Grid.SelectRow(this);
} else {
this.ColumnLayout.Grid.UnselectRow(this);
}
}
/**
* sets the isSelected property silently
*
* @param {boolean} value
* @memberof XamGridRow
*/
SetSelected(value: boolean) {
this._isSelected = value;
}
/**
* Flag to determine if the row should enter edit mode on add
*
* @memberof XamGridRow
* @wIgnore
*/
get IsEditableOnAdd(): boolean {
return this.ColumnLayout.Grid.IsEditableOnAdd;
}
/**
* Reference to parent row
*
* @type {XamGridRow}
* @memberof XamGridRow
*/
ParentRow: XamGridRow = null;
}