ng-grid

本文档详细介绍了Angular ng-grid组件的API,包括Grid Options和ColumnDefs Options,为开发者提供配置和定制网格展示的关键参数。
摘要由CSDN通过智能技术生成

API Documentation

Grid Options

id default value definition plunker
primaryKey undefined Field of user's data that should be unique. Allows you automatically update selections state for previously loaded data. Link
aggregateTemplate <div ng-click="row.toggleExpand()" ng-style="{'left': row.offsetleft}" class="ngAggregate"><span class="ngAggregateText">{ {row.label CUSTOM_FILTERS}} ({ {row.totalChildren()}} { {AggItemsLabel}})</span><div class="{ {row.aggClass()}}"></div></div> Define an aggregate template to customize the rows when grouped. See github wiki for more details. Link
afterSelectionChange function (rowItem, event) {} Callback for when you want to validate something after selection. Link
beforeSelectionChange function (rowItem, event) { return true; } Callback if you want to inspect something before selection, return false if you want to cancel the selection. return true otherwise. If you need to wait for an async call to proceed with selection you can use rowItem.continueSelection(event) method after returning false initially. Note: when shift+ Selecting multiple items in the grid this will only get called once and the rowItem will be an array of items that are queued to be selected. Link
checkboxCellTemplate <div class="ngSelectionCell"><input tabindex="-1" class="ngSelectionCheckbox" type="checkbox" ng-checked="row.selected" /></div> Checkbox cell template. see wiki for template details Link
checkboxHeaderTemplate <input class="ngSelectionHeader" type="checkbox" ng-show="multiSelect" ng-model="allSelected" ng-change="toggleSelectAll(allSelected)"/> Checkbox header template. see wiki for template details Link
columnDefs undefined definitions of columns as an array [], if not defines columns are auto-generated. See github wiki for more details. Link
data [] Data being displayed in the grid. Each item in the array is mapped to a row being displayed. Link
enableCellEdit false Globally allows all cells to be editable. use the editableCellTemplate option to override the default text input Link
enableCellSelection false Enable or disable cell navigation and selection Link
enableColumnResize false Enable or d
  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值