WireBootstrap
HomeDocsBuySupport
  • Introduction
  • Overview
  • Getting Started
  • Installation
  • Connecting to Data
    • Data Connectors
      • SQL Data
      • Custom Web Services
      • Local Data
      • Other Sources
    • Data Sources
    • Discovery
    • Building a Data Connector
  • Working With Queries
    • Select Queries
      • Query Extensions
    • Stored Procedures
    • Custom Web Services
    • Executing Queries
    • ORM
  • Writing Data
  • Updates
  • Deletes
  • Working with DataTables
    • Introduction
    • Filter and Sort
    • Select and Calculate
    • Joins
    • Rows
    • Columns
  • Working with DataSets
  • Introduction
  • Executing Queries
  • Transforms
  • Writing Data
  • Data Events
  • Working with Components
    • Introduction
    • Encapsulation
    • Configuration
      • Data
      • Events
      • Observables
      • Validation
      • Display
      • Vendor
      • Custom
    • Component
    • Web Frameworks
    • Building a Component
      • Hello World
      • Data Events
      • DataSets
  • Working With Data Events
    • Introduction
    • Event Basics
    • Event Data
    • Event Actions
  • Working with Themes
    • Introduction
    • Sample Data
    • Libraries
    • Pages
    • Building a Theme Project
  • Utilities
    • Formatting
    • Expressions
    • Collections
    • Spinners
    • Copy and Merge
    • Validation
    • Loading Assets
    • Service Calls
    • Download Files
    • Browser Location
    • Types
    • Promise
  • Reference
    • wire
      • wire.Collection
      • wire.download
      • wire.validate
    • wire.data
      • wire.data.DataEvent
      • wire.data.DataModel
      • wire.data.DataPromise
      • wire.data.DataSet
      • wire.data.DataSource
      • wire.data.DataTable
        • Columns
        • Rows
      • wire.data.StoredProcedure
      • wire.data.TableQuery
    • wire.ui
      • wire.ui.Component
      • wire.ui.validate
Powered by GitBook
On this page
  • Row Methods
  • Delete Row Methods
  • Update Row Methods

Was this helpful?

  1. Reference
  2. wire.data
  3. wire.data.DataTable

Rows

Row Methods

Name

Description

distinctArray(column)

Returns an array of distinct values in column.

insert(rows, first?)

Inserts rows into a data table. If first is passed in, the rows are inserted at the top of the Rows array.

join(table)

leftJoin(table)

newRow

Returns a new rows with the same schema as the existing rows. All values are set to null.

replace(keyName, keyValue, row)

Replaces the row with the column value keyValue in the column name keyName with the row passed in.

Delete Row Methods

Use the following methods to delete rows from a data table.

Name

Description

eq(column, value)

Deletes the rows where the column column is value.

ne(column, value)

Deletes the rows where the column column does not equalvalue.

filter(function)

Deletes rows using a custom function. As the function is evaluated, it will receive the current row, index position, and the list of all rows as delegate parameters.

The following deletes all rows where UserName is apeters.

table.delete().eq("UserName", "apeters");

Update Row Methods

Use the following methods to update the values of rows in a data table.

Name

Description

update(column)

Starts an update method chain for a column in a data table.

value(value)

Sets the value of the column passed in the update method to value.

filter(function)

Sets the value of the column passed in the update method using a custom function. As the function is evaluated, it will receive the current row, index position, and the list of all rows as delegate parameters.

The first example below sets the Active column to false for all rows. The second example sets the Active column to false only for UserName apeters. It is otherwise set to true.

table.update("Active").value(false);

...

table.update("Active").filter((row, index, rows) => {
    return (row.UserName == "apeters") ? false :  true;
});
PreviousColumnsNextwire.data.StoredProcedure

Last updated 1 year ago

Was this helpful?

Joins a data table with a second table using an inner join. Visit for examples.

Joins a data table with a second table using a left join. Visit for examples.

Visit for detailed examples of using row data table methods.

DataTable Rows
DataTables Inner Joins
DataTables Left Join