    import Datatable from 'pvbid-sdk/src/domain/Datatable.js'

public class | source

# Datatable

#### Extends:

eventemitter3~EventEmitter → AdvanceEventEmitter → BidEntity → Datatable

Datatable Class

## Constructor Summary

Public Constructor
public | constructor(datatableData: object, bid: Bid) Creates an instance of Datatable. |

## Member Summary

Public Members
public | bid: Bid Reference to the bid that the datatable belongs to. |
public get | config: object Gets the configuration information for the bid entity. |
public get | definitionId: number this get was deprecated. Definition ids will become obsolete in planned data structure upgrade. Gets the datatables's definition id. |

## Method Summary

Public Methods
public | dependants(): BidEntity[] Gets a list of bid entities that relies on the datatable instance. |
public | dirty() Flags the datatable and corresponding bid as dirty and to be saved. |
public | exportData(): object Exports datatable to core structure. |
public | getColumnValues(columnId: string): object[] Gets a list of column values. |
public | getOptions(): object[] Returns an array of the datatable row options based on the datatable key columns. |
public | getValue(columnId: string, rowId: string): string | number | boolean Retrieves a cell value. |
public | isDirty(): boolean Determines if the datatable is has changed for it's original data. |

## Inherited Summary

From class AdvanceEventEmitter
public | maxEvents: number Maximum number of events fired for the requester before events stop. |
public | on(eventName: string, requesterId: string, callback: function) |
public | onDelay(eventName: string, ms: number, requesterId: string, callback: function) |
public | removeListenerByRequester(eventName: string, requesterId: string) Removes event listeners by event and requesterId. |

From class BidEntity
public get | id: number Gets the id of the bid entity. |
public get | title: string Gets the bid entity title. |
public set | title: string Sets the bid entity title. |
public get | type: string Gets the bid entity type. |
public abstract | assess(dependency: BidEntity) Assesses bid entity. |
public | dependants(): BidEntity[] Gets an array of depndants that rely on the bid entity. |
public | dependencies(): BidEntity[] Gets all the dependencies that the bid entity relies on. |
public | dirty() Flags the bid entity as dirty and to be saved. |
public | exportData(): object Exports the internal data for the bid entity. |
public | hasNullDependency(field: string): boolean Determines if bid entity relies on a null or undefined dependency value |
public | isDirty(): boolean Determines of bid entity is dirty. |
public | pristine() Marks the bid entity as clean. |

## Public Constructors

### public constructor(datatableData: object, bid: Bid) source

Creates an instance of Datatable.

#### Override:

BidEntity#constructor

#### Params:

Name | Type | Attribute | Description
datatableData | object |  |
bid | Bid |  |

## Public Members

### public bid: Bid source

Reference to the bid that the datatable belongs to.

### public get config: object source

Gets the configuration information for the bid entity.

### public get definitionId: number source

this get was deprecated. Definition ids will become obsolete in planned data structure upgrade.

Gets the datatables's definition id.

## Public Methods

### public dependants(): BidEntity[] source

Gets a list of bid entities that relies on the datatable instance.

#### Override:

BidEntity#dependants

#### Return:

BidEntity[]

### public dirty() source

Flags the datatable and corresponding bid as dirty and to be saved.

#### Override:

BidEntity#dirty

### public exportData(): object source

Exports datatable to core structure.

#### Override:

BidEntity#exportData

#### Return:

object

### public getColumnValues(columnId: string): object[] source

Gets a list of column values.

#### Params:

Name | Type | Attribute | Description
columnId | string |  |

#### Return:

object[]

#### Return Properties:

Name | Type | Attribute | Description
id | string |  | The row id for the value.

value

string | number | boolean

- nullable: true

### public getOptions(): object[] source

Returns an array of the datatable row options based on the datatable key columns.

#### Return:

object[]

#### Return Properties:

Name | Type | Attribute | Description
title | string |  | The human readable title for the row. The title is concated from all the key columns.
row_id | string |  | Contains the row id.

### public getValue(columnId: string, rowId: string): string | number | boolean source

Retrieves a cell value.

#### Params:

Name | Type | Attribute | Description
columnId | string |  |
rowId | string |  |

#### Return:

string | number | boolean (nullable: true)

### public isDirty(): boolean source

Determines if the datatable is has changed for it's original data.

#### Override:

BidEntity#isDirty

#### Return:

boolean