projects/wms-framework/src/lib/models/controls/ColumnLayout.ts
A class representing the column layout model.
Properties |
Methods |
Accessors |
constructor(grid?: XamGridModel)
|
||||||
Creates a new instance of ColumnLayout
Parameters :
|
Columns |
Type : ColumnBaseCollection
|
Default value : new ColumnBaseCollection(this)
|
Collection of columns |
Grid |
Type : XamGridModel
|
Reference to the XamGridModel. |
OnColumnAdded | ||||||
OnColumnAdded(columnBase: XamGridColumnBaseModel)
|
||||||
Callback function when added a new Column
Parameters :
Returns :
void
|
EditingSettings | ||||||
getEditingSettings()
|
||||||
Get the grid editing settings object
Returns :
EditingSettings
|
||||||
setEditingSettings(value: EditingSettings)
|
||||||
Set the grid editing settings object
Parameters :
Returns :
void
|
ColumnWidthResolved |
getColumnWidthResolved()
|
Gets the column width associated to the layout
Returns :
ColumnWidth
|
import { ColumnWidth } from './DataGridLengthModel';
import { XamGridColumnBaseModel } from './XamGridColumnModel';
import {
ColumnBaseCollection,
EditingSettings,
XamGridModel,
} from './XamGridModel';
/**
* A class representing the column layout model.
*
* @export
* @class ColumnLayout
* @wType Infragistics.Controls.Grids.ColumnLayout
*/
export class ColumnLayout {
/**
* Reference to the XamGridModel.
*
* @type {ColumnBaseCollection}
* @memberof XamGridModel
*/
Grid: XamGridModel;
/**
* Creates a new instance of ColumnLayout
*
* @param {XamGridModel} grid
* @memberof ColumnLayout
*/
constructor(grid?: XamGridModel) {
this.Grid = grid ?? null;
}
/**
* Collection of columns
*
* @type {ColumnBaseCollection}
* @memberof ColumnLayout
*/
Columns: ColumnBaseCollection = new ColumnBaseCollection(this);
/**
* Get the grid editing settings object
*
* @readonly
* @type {EditingSettings}
* @memberof ColumnLayout
*/
get EditingSettings(): EditingSettings {
return this.Grid.EditingSettings;
}
/**
* Set the grid editing settings object
*
* @readonly
* @type {EditingSettings}
* @memberof ColumnLayout
*/
set EditingSettings(value: EditingSettings) {
this.Grid.EditingSettings = value;
}
/**
* Gets the column width associated to the layout
*
* @readonly
* @type {ColumnWidth}
* @memberof ColumnLayout
*/
get ColumnWidthResolved(): ColumnWidth {
return this.Grid?.ColumnWidth ?? ColumnWidth.Auto;
}
/**
* Callback function when added a new Column
*
* @type {XamGridColumnBaseModel}
* @memberof ColumnLayout
*/
OnColumnAdded(columnBase: XamGridColumnBaseModel): void {
if (this.Grid != null) {
columnBase.ColumnLayout = this;
}
}
}