https://github.com/angular-ui/ng-grid
https://github.com/angular-ui/ng-grid/wiki
Grid Options
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) {} | 选择之后的回调函数 | Link |
beforeSelectionChange | function (rowItem, event) { return true; } | 选择之前的回调函数,返回false,则取消选择,返回true,继续选择。如果你需要一个异步的回调,可以使用rowItem.continueSelection(event) 。注意:当使用shift多选时,仅仅触发一次,并且rowItem返回一个数组 | Link |
checkboxCellTemplate | <div class="ngSelectionCell"><input tabindex="-1" class="ngSelectionCheckbox" type="checkbox" ng-checked="row.selected" /></div> | Checkbox的模板 | Link |
checkboxHeaderTemplate | <input class="ngSelectionHeader" type="checkbox" ng-show="multiSelect" ng-model="allSelected" ng-change="toggleSelectAll(allSelected)"/> | Checkbox 的头模板 | Link |
columnDefs | undefined | 列定义 | Link |
data | [] | 数据源 | Link |
enableCellEdit | false | 全局设置,是否允许CellEdit,可以使用editableCellTemplate覆盖。 | Link |
enableCellSelection | false | 是否允许CellSelection | Link |
enableColumnResize | false | 是否允许ColumnResize | Link |
enableColumnReordering | false | 是否允许列重新排序 | Link |
enableHighlighting | false | Enable or disable cell content selection | Link |
enablePaging | false | 是否分页 | Link |
enableRowReordering | false | Enable drag and drop row reordering. Only works in HTML5 compliant browsers. | Link |
enableRowSelection | true | To be able to have selectable rows in grid. (was canSelectRows prior to 2.0) | Link |
enableSorting | true | 是否允排序 | Link |
filterOptions | { filterText: '', useExternalFilter: false } | filterText: 搜索框中绑定的内容. useExternalFilter: Bypass internal filtering if you want to roll your own filtering mechanism but want to use builtin search box. | Link |
footerRowHeight | 55 | footer的像素 | Link |
groups | [] | 分组,使用fieldName,并不是displayName | Link |
groupsCollapsedByDefault | true | 当分组的时候折叠 | Link |
headerRowHeight | 32 | header row 的像素 | Link |
headerRowTemplate | undefined | Define a header row template for further customization. See github wiki for more details. | Link |
jqueryUIDraggable | false | Enables the use of jquery UI reaggable/droppable plugin. requires jqueryUI to work if enabled. Useful if you want drag + drop but your users insist on crappy browsers. | Link |
jqueryUITheme | false | Enable the use jqueryUIThemes | Link |
keepLastSelected | true | prevent unselections when ini single selection mode. | Link |
maintainColumnRatios | undefined | 在调整列宽时,重新调整大小,默认为true。Maintains the column widths while resizing. Defaults to true when using *'s or undefined widths. Can be ovverriden by setting to false. | Link |
multiSelect | true | 是否多选 | Link |
pagingOptions | { pageSizes: [250, 500, 1000], pageSize: 250, totalServerItems: 0, currentPage: 1 } | pageSizes: list of available page sizes. pageSize: currently selected page size. totalServerItems: Total items are on the server. currentPage: the uhm... current page. | Link |
plugins | [] | Array of plugin functions to register in ng-grid | Link |
rowHeight | 30 | Row height of rows in grid. | Link |
rowTemplate | <div ng-style="{ 'cursor': row.cursor }" ng-repeat="col in renderedColumns" ng-class="col.colIndex()" class="ngCell {{col.cellClass}}"><div class="ngVerticalBar" ng-style="{height: rowHeight}" ng-class="{ ngVerticalBarVisible: !$last }"> </div><div ng-cell></div></div> | Define a row Template to customize output. See github wiki for more details. | Link |
selectedItems | [] | 选择的items,数组 | Link |
selectWithCheckboxOnly | false | Disable row selections by clicking on the row and only when the checkbox is clicked. | Link |
showColumnMenu | false | 是否显示菜单来选择显示和分组列,如果showColumnMenu和showFilter都为false,按钮不显示 | Link |
showFilter | false | 是否在column menu中显示搜索框.,如果showColumnMenu和showFilter都为false,按钮不显示 | Link |
showFooter | false | 是否显示footer | Link |
showGroupPanel | false | 是否显示分组拖拽区域 | Link |
sortInfo | { fields: [], directions: [] } | 定义一个默认的排序. You can also observe this variable to utilize server-side sorting (see useExternalSorting). Syntax is sortInfo: { fields: ['fieldName1',' fieldName2'], directions: ['asc', 'desc']}. Directions are case-insensitive | Link |
showSelectionCheckbox | false | 是否选择checkbox | Link |
tabIndex | 0 | Set the tab index of the Vieport. | Link |
useExternalSorting | false | Prevents the internal sorting from executing. The sortInfo object will be updated with the sorting information so you can handle sorting (see sortInfo) | Link |
virtualizationThreshold | 50 | The threshold in rows at which to force row virtualization on. | Link |
selectRow | function (rowIndex, state) | 程序化的选择行 | Link |
selectItem | function (itemIndex, state) | 程序化的选择行 | Link |
ColumnDefs Options
aggLabelFilter | '' | string name for filter to use on the aggregate label ('currency', 'date', etc..) defaults to cellFilter if not set. | Link |
cellClass | '' | Appends a css class for the column cells | Link |
cellFilter | '' | string name for filter to use on the cell ('currency', 'date', etc..) | Link |
cellTemplate | <div class="ngCellText" ng-class="col.colIndex()"><span ng-cell-text>{{COL_FIELD CUSTOM_FILTERS}}</span></div> | Sets the cell template for the column. See github wiki for more details. | Link |
displayName | field | Sets the pretty display name of the column. default is the field given | Link |
editableCellTemplate | <input ng-class="'colt' + col.index" ng-input="COL_FIELD" /> | Sets the editableCellTemplate for the column. Displayed when user uses enableFocusedCellEdit and cell is focused. | Link |
enableCellEdit | false | Displays cellTemplate when user is not focused on cell. Displays editableCellTemplate when user focuses on cell. | Link |
field | '' | The string name of the property in your data model you want that column to represent. Can also be a property path on your data model. 'foo.bar.myField', 'Name.First', etc.. | Link |
groupable | true | Whether or not the user is allowed to group the column | Link |
headerCellTemplate | <div class="ngHeaderSortColumn {{col.headerClass}}" ng-style="{'cursor': col.cursor}" ng-class="{ 'ngSorted': !noSortVisible }"><div ng-click="col.sort($event)" ng-class="'colt' + col.index" class="ngHeaderText">{{col.displayName}}</div><div class="ngSortButtonDown" ng-show="col.showSortButtonDown()"></div><div class="ngSortButtonUp" ng-show="col.showSortButtonUp()"></div><div class="ngSortPriority">{{col.sortPriority}}</div><div ng-class="{ ngPinnedIcon: col.pinned, ngUnPinnedIcon: !col.pinned }" ng-click="togglePin(col)" ng-show="col.pinnable"></div></div><div ng-show="col.resizable" class="ngHeaderGrip" ng-click="col.gripClick($event)" ng-mousedown="col.gripOnMouseDown($event)"></div> | Sets the template for the column header cell. See github wiki for more details. | Link |
headerClass | '' | Appends a css class for the column header. | Link |
maxWidth | 9000 | Sets the maximum width of the column. | Link |
minWidth | 50 | Sets the minimum width of the column. | Link |
pinnable | true | Whether or not column can be pinned to the left. | Link |
resizable | true | Whether or not column is resizable. | Link |
sortable | true | Whether or not column is sortable. | Link |
sortFn | Based on the detected data type | Sets the sort function for the column. Useful when you have data that is formatted in an unusal way or if you want to sort on an underlying data type. Check theMDN sort docs for examples | Link |
visible | true | Whether or not the column is visible by default. Can be overridden by the user at run-time if showColumnMenu is true. | Link |
width | '*' | Sets the width of the column. Can be a fixed width in pixels as an int (42), string px('42px'), percentage string ('42%'), weighted asterisks (width divided by total number of *'s is all column definition widths) See github wiki for more details. | Link |
From: http://blog.csdn.net/violet_day/article/details/17448133
相关推荐
<th tr-ng-grid-column field="name" filter="{ term: 'searchName', condition: gridUtils.filter.contains }"> ``` - **分页**:启用分页功能,需要设置`itemsPerPage`属性并添加分页模板: ```html <div tr...
这个名为“前端项目-ng-grid.zip”的压缩包包含了一个完整的ng-grid项目,其中的核心部分是“ui-grid-master”目录。这篇文章将详细介绍ng-grid的特性、使用方法以及如何在实际开发中应用。 ng-grid是一款强大的...
ng-Grid是一款基于AngularJS的数据网格组件,用于展示和操作大量结构化的数据。它提供了丰富的功能,如排序、过滤、分页、编辑等,适用于构建数据密集型的应用。本资源"ng-grid实现动态列表.rar"包含ng-Grid动态列的...
【标题】"ng-grid-2.0.11-2.zip" 涉及的知识点主要围绕AngularJS框架中的ng-grid组件,这是一个用于构建数据驱动的表格的强大工具。ng-grid是AngularJS生态中的一个核心库,它允许开发者以灵活、高效的方式展示和...
"ng-grid-master" 是一个基于 AngularJS 框架的表格控件库,它提供了强大的数据展示和操作功能,适用于构建动态、交互式的 Web 应用。AngularJS 是 Google 推出的一款前端 JavaScript 框架,以其双绑定机制和模块化...
**AngularJS后端解决方案:具有简单REST API的ng-grid** AngularJS是一款强大的前端JavaScript框架,由Google维护,用于构建交互式、数据驱动的Web应用程序。它通过双向数据绑定、指令和依赖注入等特性,简化了前端...
**AngularJS ng-grid 框架详解** 在前端开发领域,AngularJS是一个广泛使用的JavaScript框架,它极大地简化了构建交互式Web应用的过程。而ng-grid是AngularJS中的一个强大组件,专为创建复杂的、数据驱动的表格而...
AngularJS拥有丰富的模块库,其中ui-router和ng-grid就是两个常用的模块,它们各有特色,共同服务于构建动态的Web应用程序。 ui-router是AngularJS的一个第三方路由解决方案,它支持深层次的路由配置。在AngularJS...
ng-grid-fontawesome 使用的字体是使用fontello生成的字体,并且是font-awesome的子集(一个图标除外-fontelico的spin5)。 如果您已经使用font-awesome,则可以使用它代替ui-grid字体。 用法 例子示例 提醒自己 ...
网格的 API 类似于 ng-grid 的 API,表格架构(每个网格 3 个表)类似于 jQuery DataTables 的架构。 有关文档,请参阅: : 。 鲍尔 bower install ngReactGrid 特征 快速,出色的性能 固定标题 服务器端钩子 ...
在本文中,我们将深入探讨如何在AngularJS应用中结合ng-grid 3库实现子网格(sub-grid)和分页功能。ng-grid是一个强大的数据网格组件,适用于展示和操作大量数据,而子网格和分页是优化用户体验和提高性能的关键...
ng-grid和简单的REST 该演示提供了一个使用Angular和ng-grid的网格解决方案,该解决方案可以连接到使用NodeJS和ExpressJS在本地运行的RESTful端点。如何使用角gr种子克隆有角度的种子库并开始黑客攻击...在开发过程...
弃用:ng-grid 2.x不再处于积极开发中。 3.0版称为 ,并且正在积极维护。ng-grid:Angular数据网格 _注意:我们不再接受基于2. *分支的基于功能的请求。 所有活动功能的开发都在3.x中进行。 版本2.x当前没有维护者,...
<div ng-grid="gridOptions"> ``` ```javascript var app = angular.module('myApp', ['ngGrid']); app.controller('MyCtrl', function($scope) { $scope.myData = [ { name: "John Doe", age: 35 }, // 更多...
《ng-complete-table:一个 Ng-grid 和 ng-table 的替代选择》 在前端开发中,数据展示是不可或缺的一部分,尤其是在处理大量数据时,一个高效且功能丰富的表格组件显得尤为重要。Ng-grid 和 ng-table 曾经是 ...
"ag-grid-ng-forms"是一个基于Angular框架和TypeScript开发的项目,主要目的是将流行的ag-Grid数据网格组件与Angular表单(ngForms)集成,提供更强大的数据管理和用户交互功能。ag-Grid是一个功能丰富的JavaScript...
ng-init="init('rest', '/data/mock.json')" ng-grid ... ng-endless-scroll ng-endless-scroll-append="append()" LocalStorage 数据源: ng-init="init('localstorage', 'test')" ng-grid ... ng-endless-scroll...
在这个名为"前端项目-tree-grid-directive.zip"的压缩包中,包含了一个使用AngularJS实现的树网格指令。AngularJS是一款强大的前端JavaScript框架,它通过声明式编程和依赖注入来简化Web应用的开发。下面将详细探讨...