ng2-handsontable核心方法打字稿

时间:2017-04-10 18:39:47

标签: typescript handsontable

我正在使用打字稿中的n2-handsontable构建一些屏幕,如下所示:

@Component({
  moduleId: module.id,
  selector: 'companygrid',
  template:`
           <hot-table [data]="data"
           (afterChange)="afterChange($event)"
           (afterSelection)="afterSelection($event)"
           (afterOnCellMouseDown)="afterOnCellMouseDown($event)"
           [col-headers]="colHeaders"
           [columns]="columns"
           [options]="options"
           [col-widths]="colWidths">
           </hot-table>
           `
})
export class CompanyGridComponent {
  private data: Array<any> = genCompanyData(30);
  //private data: Array<any> = this.getCompanies();
  private colHeaders: Array<string> = ['Name', 'Code', 'AccountNumber', 'CompanyNameAbbr', 'CompanyType', 'OwnershipStatus', 'YearFounded'];
.
.
.
  private afterChange(e: any) {
    console.log(e);
  }

  private afterOnCellMouseDown(e: any) {
    console.log(e);
  }

事情有效。

我如何调用核心方法,例如selectCell?

谢谢,

约翰

0 个答案:

没有答案