当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript main.GridApi类代码示例

本文整理汇总了TypeScript中ag-grid/main.GridApi的典型用法代码示例。如果您正苦于以下问题:TypeScript GridApi类的具体用法?TypeScript GridApi怎么用?TypeScript GridApi使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了GridApi类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: selectPrevious

  selectPrevious(gridApi: GridApi) {
    //Select first node if none selected
    if (gridApi.getSelectedNodes().length === 0) {
      gridApi.getModel().getRow(0).setSelected(true, true);
      return;
    }

    let rowIndex = gridApi.getSelectedNodes()[0].childIndex;
    if (-1 < rowIndex - 1) {
      gridApi.getModel().getRow(rowIndex - 1).setSelected(true, true);
    }
  }
开发者ID:stajics,项目名称:poslovna_informatika,代码行数:12,代码来源:grid.service.ts

示例2: selectNext

  selectNext(gridApi: GridApi) {
    //Select first node if none selected
    if (gridApi.getSelectedNodes().length === 0) {
      gridApi.getModel().getRow(0).setSelected(true, true);
      return;
    }

    let rowIndex = gridApi.getSelectedNodes()[0].childIndex;
    let rowCount = gridApi.getModel().getRowCount();
    if (rowCount > rowIndex + 1) {
      gridApi.getModel().getRow(rowIndex + 1).setSelected(true, true);
    }
  }
开发者ID:stajics,项目名称:poslovna_informatika,代码行数:13,代码来源:grid.service.ts

示例3: selectElement

 //select given JSON element
 selectElement(gridApi: GridApi, json) {
   gridApi.getModel().forEachNode(rowNode => {
     for(let key in json){
       if(rowNode.data[key].toString() !== json[key].toString()){
         return;
       }
     }
     rowNode.setSelected(true, true);
   });
 }
开发者ID:stajics,项目名称:poslovna_informatika,代码行数:11,代码来源:grid.service.ts

示例4: refreshView

 refreshView(gridApi: GridApi) {
   gridApi.refreshView();
 }
开发者ID:stajics,项目名称:poslovna_informatika,代码行数:3,代码来源:grid.service.ts

示例5: updateSelected

 //Set selected element in store
 updateSelected(gridApi: GridApi, _owner) {
   this._store.dispatch({type: 'SELECT_ELEMENT', payload: {data: gridApi.getSelectedRows()[0], owner: _owner}});
 }
开发者ID:stajics,项目名称:poslovna_informatika,代码行数:4,代码来源:grid.service.ts

示例6: createDefaultMenuItems

    private createDefaultMenuItems(): {[key: string]: MenuItem} {

        var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();

        var result: {[key: string]: MenuItem} = {
            copy: {
                name: localeTextFunc('copy','Copy'),
                shortcut: localeTextFunc('ctrlC','Ctrl+C'),
                icon: svgFactory.createCopyIcon(),
                action: ()=> this.clipboardService.copyToClipboard()
            },
            paste: {
                name: localeTextFunc('paste','Paste'),
                shortcut: localeTextFunc('ctrlV','Ctrl+V'),
                disabled: true,
                icon: svgFactory.createPasteIcon(),
                action: ()=> this.clipboardService.pasteFromClipboard()
            },
            toolPanel: {
                name: localeTextFunc('toolPanel', 'Tool Panel'),
                checked: this.gridApi.isToolPanelShowing(),
                action: ()=> this.gridApi.showToolPanel(!this.gridApi.isToolPanelShowing())
            }
        };

        return result;
    }
开发者ID:grupopzm,项目名称:ag-grid-enterprise,代码行数:27,代码来源:contextMenu.ts

示例7:

 action: ()=> this.gridApi.showToolPanel(!this.gridApi.isToolPanelShowing())
开发者ID:grupopzm,项目名称:ag-grid-enterprise,代码行数:1,代码来源:contextMenu.ts


注:本文中的ag-grid/main.GridApi类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。