ng-grid

ng-options with simple array init

余生颓废 提交于 2019-11-27 10:24:18
I'm a little bit confused with Angular and ng-options . I have a simple array and I want to init a select with it. But, I want that options value = label. script.js $scope.options = ['var1', 'var2', 'var3']; html <select ng-model="myselect" ng-options="o for o in options"></select> What I get: <option value="0">var1</option> <option value="1">var2</option> <option value="2">var3</option> What I want: <option value="var1">var1</option> <option value="var2">var2</option> <option value="var3">var3</option> So I tried: <select ng-model="myselect2" ng-init=0 ng-options="options[k] as v for (k,v) in

AngularJS (ng-grid) “editableCellTemplate” remains in edit mode on loss of focus

会有一股神秘感。 提交于 2019-11-27 06:50:59
问题 In the latest version of ng-grid(v2.0.7), when a editableCellTemplate is in edit mode and loses focus, it remain in edit mode. Is this a bug or did I configure the grid incorrectly? Here's an example: http://plnkr.co/edit/OgEjk7wFaC982FrKbeHH?p=preview where column 0 contains the editableCellTemplate. 回答1: I found the answer in one of the templates inside of ng-grid.js. I was missing ng-input="COL_FIELD" <select ng-cell-input ng-class="'colt' + $index" ng-input="COL_FIELD" ng-model="COL_FIELD

Angular ng-grid row height

£可爱£侵袭症+ 提交于 2019-11-27 02:07:49
问题 is there any way to apply the height of the row in ng-grid according to its content. there is one option rowHeight which is changed the height of all row. But I want dynamic row height according to its content. Following is the Plunker I have made, in this I have used cellTemplate to insert Education field, But I want to increase the row height according to education field detail. http://plnkr.co/edit/tQJNpB?p=preview According to this link it is not possible: [1]https://github.com/angular-ui

ui.boostrap accordion container width issue

隐身守侯 提交于 2019-11-26 22:12:08
问题 THIS PLUNKER REFERS I'm having an issue using ng-Grid inside a ui.bootstrap accordion. Take a look at my Plunker to see the issue in action. Essentially, when placing a grid inside an accordion with the child accordion-group closed on initial page load, the grid is assigned a width of zero and does not display. Can anyone point me in a direction to solve this, either by adjusting CSS classes or by trapping the accordion-group events and re-rendering the grid? I've been running around in

Best way to represent a Grid or Table in AngularJS with Bootstrap 3? [closed]

有些话、适合烂在心里 提交于 2019-11-26 17:59:29
I am creating an App with AngularJS and Bootstrap 3. I want to show a table/grid with thousands of rows. What is the best available control for AngularJS & Bootstrap with features like Sorting, Searching, Pagination etc. After trying out ngGrid, ngTable, trNgGrid and Smart Table , I have come to the conclusion that Smart Table is by far the best implementation AngularJS-wise and Bootstrap-wise. It is built exactly the same way as you would build your own, naive table using standard angular. On top of that, they have added a few directives that help you do sorting, filtering etc. Their approach

AngularJS and ng-grid - auto save data to the server after a cell was changed

為{幸葍}努か 提交于 2019-11-26 15:21:44
问题 My Use Case is pretty simple. A User, after editing a Cell (enableCellEdit: true), should have the data "automatically" sent to the server (on cell blur). I tried different approaches but none of them have properly worked out. I have a minimalistic grid: // Configure ng-grid $scope.gridOptions = { data: 'questions', enableCellSelection: true, selectedItems: $scope.selectedRow, multiSelect: false, columnDefs: [ {field: 'id', displayName: 'Id'}, {field: 'name', displayName: 'Name'}, {field:

ng-options with simple array init

淺唱寂寞╮ 提交于 2019-11-26 15:09:46
问题 I'm a little bit confused with Angular and ng-options . I have a simple array and I want to init a select with it. But, I want that options value = label. script.js $scope.options = ['var1', 'var2', 'var3']; html <select ng-model="myselect" ng-options="o for o in options"></select> What I get: <option value="0">var1</option> <option value="1">var2</option> <option value="2">var3</option> What I want: <option value="var1">var1</option> <option value="var2">var2</option> <option value="var3"