File

src/lib/components/bound-field/bound-field.component.ts

Description

Angular Component for the BoundField Control.

Extends

DataControlFieldComponent

Metadata

Index

Properties
Methods
Inputs
Accessors

Constructor

constructor(refChange: ChangeDetectorRef, render2: Renderer2, elem: ElementRef, webComponents: WebComponentsService, bringTopServ1: BringTopService)

Creates an instance of BoundFieldComponent.

Parameters :
Name Type Optional
refChange ChangeDetectorRef No
render2 Renderer2 No
elem ElementRef No
webComponents WebComponentsService No
bringTopServ1 BringTopService No

Inputs

dataField
Type : string

Gets/sets the dataField property.

dataFormatString
Type : string

Gets/sets the dataFormat property.

headerText
Type : string

Gets/sets the headerText property.

sortExpression
Type : string

Gets/sets the sortExpression property.

visible
Type : boolean

Gets/sets the visible property.

Methods

isBindedEvent
isBindedEvent(event: string)

Override the isBindedEvent to get the event from the Field model

Parameters :
Name Type Optional
event string No
Returns : boolean

{boolean}

Properties

Private dataFieldInternal
Type : string
Default value : ''

Property to save the dataField value.

Private dataFormatStringInternal
Type : string
Default value : ''

Property to save the dataFormatString value.

Private headerTextInternal
Type : string
Default value : ''

Property to save the headerText value.

Private sortExpressionInternal
Type : string
Default value : ''

Property to save the sortExpression value.

Private visibleInternal
Default value : true

Property to save the visible value.

Accessors

dataField
getdataField()
setdataField(value: string)

Gets/sets the dataField property.

Parameters :
Name Type Optional
value string No
Returns : void
dataFormatString
getdataFormatString()
setdataFormatString(value: string)

Gets/sets the dataFormat property.

Parameters :
Name Type Optional
value string No
Returns : void
import {
  ChangeDetectionStrategy,
  ChangeDetectorRef,
  Component,
  ElementRef,
  Input,
  Optional,
  Renderer2
} from '@angular/core';
import { dataTransfer, BringTopService } from '@mobilize/base-components';
import { ErrorCodes, ExceptionHandlerClass } from '@mobilize/webmap-core';
import { WebComponentsService } from '@mobilize/winforms-components';
import { DataControlFieldComponent } from '../data-control-field/data-control-field.component';

/**
 * Angular Component for the BoundField Control.
 *
 * @export
 * @class BoundFieldComponent
 * @extends {ControlComponent}
 */
@Component({
  changeDetection: ChangeDetectionStrategy.OnPush,
  selector: 'wm-bound-field',
  templateUrl: './bound-field.component.html',
  styleUrls: ['./bound-field.component.scss'],
  providers: [
    { provide: DataControlFieldComponent, useExisting: BoundFieldComponent }
  ],
  inputs: ['model']
})
@dataTransfer(['bndfld'])
@ExceptionHandlerClass(ErrorCodes.Winforms)
export class BoundFieldComponent extends DataControlFieldComponent {
  /**
   * Property to save the dataField value.
   *
   * @private
   * @memberof BoundFieldComponent
   */
  private dataFieldInternal = '';

  /**
   * Property to save the dataFormatString value.
   *
   * @private
   * @memberof BoundFieldComponent
   */
  private dataFormatStringInternal = '';

  /**
   * Creates an instance of BoundFieldComponent.
   *
   * @param {ChangeDetectorRef} refChange
   * @param {Renderer2} render2
   * @param {ElementRef} elem
   * @param {WebComponentsService} webComponents
   * @param {BringTopService} bringTopServ1
   * @memberof BoundFieldComponent
   */
  constructor(
    private refChange: ChangeDetectorRef,
    private render2: Renderer2,
    private elem: ElementRef,
    webComponents: WebComponentsService,
    @Optional() private bringTopServ1: BringTopService
  ) {
    super(refChange, render2, elem, webComponents, bringTopServ1);
  }

  /**
   * Gets/sets the dataField property.
   *
   * @memberof BoundFieldComponent
   */
  @Input()
  set dataField(value: string) {
    this.dataFieldInternal = value;
  }

  get dataField(): string {
    return this.model?.DataField ?? this.dataFieldInternal;
  }

  /**
   * Gets/sets the dataFormat property.
   *
   * @memberof BoundFieldComponent
   */
  @Input()
  set dataFormatString(value: string) {
    this.dataFormatStringInternal = value;
  }

  get dataFormatString(): string {
    return this.model?.DataFormatString ?? this.dataFormatStringInternal;
  }
}
<div></div>

./bound-field.component.scss

Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""