angularjs - Ng-grid how to save the value of the cell? -


I have to apply an invoice, and I have to use ng-grid.

But I can not figure out how to insert the user into the cell, and how to use it.

  $ scope.myData = [{}, {}, {}]; / * Tr line di default * / $ scope.gridOptions = {data: 'MyData', enableCellSelection: true, enableCellEdit: true, enableRowSelection: false, columnDefs: [[region: 'NÚMERO', DISPLAYNAME: 'NÚMERO', enableCellEdit: true} {region: 'descrizione', DISPLAYNAME: 'descrizione'} {region: 'CostoUnitario', DISPLAYNAME: 'Costo Unitario', enableCellEdit: true} {region: 'QTA', DISPLAYNAME: 'QTA', enableCellEdit: True}, {field: 'totel', display name: 'totel', enabled cell edit: wrong},]}; $ Scope.addRow = function () {$ scope.myData.push ({}); };   

I do not know how to do it!

line. Try to use an object object ..

HTML side But, define your input with the NG-model = "Exempel" as you probably did. On the angular side, get your textbox value along the line. Example:

An example that I did recently. See the last columndef column.

  $ scope.gridOptions = {data: 'accounts', multiple selection : False, showFilter: false, showColumnMenu: false, showSelectionCheckbox: false, showGroupPanel: false, showMenu: false, showFooter: false, enableRowSelection: false, columnDefs: [[region: 'username', DISPLAYNAME: 'username', width : 180} {region: 'email', DISPLAYNAME: 'email', width: 250} {region: 'role.displayTxt', DISPLAYNAME: 'role', width: 120} {region: 'active', DISPLAYNAME: 'active ', Width: 80}, {field : '', DisplayName: '', width: 50, Seltamplet: '& lt; div class = "grid-action-cell" & gt; + '& Lt; One class = "btn-link" type = "button" title = "edit" ng- href = "# / accounts / {{row.entity.username}}" & gt; + '& Lt; i class = "glyphicon glyphicon-edit" style = "left: 8px; top: 8px;" & Gt; & Lt; / I & gt; + '& Lt; / a & gt; + '& Lt; / Div> },]};    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -