ng-grid

How to prevent Row selection on custom elements click in UI-GRID

人盡茶涼 提交于 2019-12-13 02:17:24
问题 I'm facing a problem in using UI-GRId with row selection and custom cell elements: The sample plunker is here : http://plnkr.co/edit/Ed6s6CGFGXyUzj2cyx2g?p=preview $scope.gridOptions = { showGridFooter:true,enableRowSelection: true, enableRowHeaderSelection: false }; $scope.gridOptions.columnDefs = [ { name: 'id' }, { name: 'name'}, { name: 'age', displayName: 'Age (not focusable)', allowCellFocus : false }, { name: 'address.city' }, { name:'address.pin',cellTemplate:'<select><option value=

Angular JS ng Grid Default global configurations

◇◆丶佛笑我妖孽 提交于 2019-12-13 00:24:41
问题 I am creating a new application using Angular JS where ng grid used at many pages. I want to enable some global configuration for all the grid so that I can change the look and feel from a common place for all grids like, allow sorting, re-size of columns etc. Below thread is explaining a bit about this, I would appreciate if someone can provide a more details with some code examples. https://github.com/angular-ui/ng-grid/issues/249 I want to implement all global configuration in such a way

Date format in ng-grid row template

跟風遠走 提交于 2019-12-12 11:24:16
问题 I've created a ng-grid with the following column definitions: columns: [ { field: "CompanyPkid", visible: false }, { field: "CompanyName", visible: false }, { field: "StartDate", visible: false, cellFilter: "date:'yyyy-MM-dd'" }, { field: "CompanyId", displayName: "Company ID", cellTemplate: "<div class=\"ngCellText\" ng-class=\"col.colIndex()\">"+ "<a href=\"Company/Edit/{{row.getProperty('CompanyPkid')}}\">"+ "{{row.getProperty(col.field)}}"+ "</a><br />"+ "{{row.getProperty('CompanyName')}

How to use page scroll on ngGridEventScroll?

夙愿已清 提交于 2019-12-12 10:46:28
问题 Using ngGrid v2.X, I'm trying to devolop a grid that loads more data when page scroll (not grid scroll) goes bottom. By searching for similar questions i've found a solution to my 1st problem : ngGrid must have dynamic height , so i've did this .ngViewport{ height:auto !important; } .ngCanvas, .ngViewport, .ngRow, .ngFooterPanel, .ngTopPanel { width: 100% !important; } .ngRow { border-bottom:none !important; } Which takes me to my 2nd problem. I need data be loading by scroll, and i've found:

Ng-grid Cannot set property 'gridDim' of undefined

青春壹個敷衍的年華 提交于 2019-12-12 10:36:01
问题 I'm new in Angular, and I try to declare gridOption for ng-grid Within a function in costroller. It cause an error: TypeError: Cannot set property 'gridDim' of undefined I tried to solve it using $scope.apply and ng-if in template. But nothing from this is working for me. Thanks for any advice: method of the Controller: $scope.getTest = function() { $http.get('http://www.iNorthwind.com/Service1.svc/getAllCustomers') .success(function (data, status, headers, config) { //$scope.myData = data;

Angular ui grid (ng-grid) 3: showHeader isn't changing anything

杀马特。学长 韩版系。学妹 提交于 2019-12-12 01:55:10
问题 I'm playing around with this angular plugin. Here's my issue - I'm setting the grid with no headers as default. When I want to set the grid header back, it doesn't work by changing the gridOptions.showHeader attribute. Here's my toggle code (I've added the refresh() once I saw it doesn't work without it but the refresh() doesn't help as well): $scope.toggleHeader = function(){ $scope.gridOptions.showHeader = !$scope.gridOptions.showHeader; $scope.gridApi.grid.refresh(); } Here's a plnkr: http

Combining ng-grid and ui-select2: unable to select a value

萝らか妹 提交于 2019-12-12 00:44:28
问题 In the editableCellTemplate of an ng-grid, I wanted to use a more user-friendly dropdown, and I found ui-select2 to be a good one. The thing is however, that any click on this component, when it is used inside the ng-grid, results in the cell juming back to non-editable mode. This way I can't select another value using the mouse (I can using the arrows on my keyboard). When I put the dropdown in the cellTemplate, it works, but it should also work in the * editable *CellTemplate. Some code to

ng-grid : Why is afterSelectionChange() called twice?

橙三吉。 提交于 2019-12-11 22:54:37
问题 I did not like the answer to this question. To my mind, it has a bad code smell. I am new to Angular, so I thought I could learn something if I created a Plunk to help that questioner. My Plunk is http://plnkr.co/edit/fJcew7cGCPzJ0nhIQXjg?p=preview, but there two things which I don't understand. Please note that I assigned the ng-grid's data two ways - at one fell stroke and row by row. Comment one out & uncomment the other to play around with it. And be sure to press F12 to see the developer

ng-grid server side paging

瘦欲@ 提交于 2019-12-11 20:13:26
问题 I'm a little confused on how to use the sever side paging for ng-grid. (http://angular-ui.github.io/ng-grid/) Can someone point me in the right direction on how to achieve this on the server side? The example shows a static json file. How and where are the parameteres set for limit and offset so I can adjust my sql query and output. It seems on the surface it is all loaded at once. Thanks. I know this may get down votes but had to take the chance. 回答1: Not sure if this helps you because I use

Add directive to elements produced by ng-grid

核能气质少年 提交于 2019-12-11 16:23:44
问题 Using ng-grid , I developed a simple application to render an excel sheet in UI. I want the fields(table headers) to be draggable, so that I can drop them at run time into some bins, somewhat like - this. The only difference being, here I will be dragging the excel column header. I can't figure out how to add directive "draggable" to something generated by ng-grid. P.S. Every column header has to have its own "draggable", so that I may uniquely identify the column number/name Angular code