Options
All
  • Public
  • Public/Protected
  • All
Menu

CanvasTable draw table in canvas

import { CanvasTable, Align } from "mthb-canvas-table";

const col:CanvasTableColumnConf[] = [
  {
      header: "Id",
      field: "__rownum__",
      width: 80,
      align: Align.center
  },
  {
      header: "Name",
      field: "name",
      width: 200
  },
  {
      header: "LastName",
      field: "lastName",
      width: 200
  }
];

let data = [{name: "Magni", lastName: "Birgisson"}, {name: "Dagrún", lastName: "Þorsteinsdóttir"}];

 /// <canvas id="canvas" style="width:400px; height: 400px"> </canvas>
const canvasTable = new CanvasTable("canvas", col, data);

Type parameters

  • T

    Type of objects the list contains

Hierarchy

Implements

Index

Constructors

constructor

Methods

addEvent

askForReDraw

askForReIndex

  • askForReIndex(): void

clearEditData

  • clearEditData(): void

collapseAll

  • collapseAll(): void

expendAll

  • expendAll(): void

getEditData

  • getEditData(): object

getScrollView

getTableMode

getUpdateData

  • getUpdateData(row: number, field: string): object | undefined

getUpdateDataOrData

  • getUpdateDataOrData(row: number, field: string): any

isPlanToRedraw

  • isPlanToRedraw(): boolean

removeEvent

resize

  • resize(): void

setAllowEdit

  • setAllowEdit(allowEdit: boolean): void

setColumnVisible

setCustomSort

  • setCustomSort(customSort?: CustomSort<T> | null): void

setData

  • setData(data?: T[]): void

setFilter

setGroupBy

setRowColStyle

setRowTableGroup

setSort

setTableMode

setUpdateData

  • setUpdateData(row: number, field: string, data: any): void

updateColumns

updateConfig

Generated using TypeDoc