Wijmo 5 [Wijmo input in FlexGrid]
Combo box and input number is used inside grid and access there value using ng-model
HTML
<link rel="stylesheet" href="http://cdn.wijmo.com/5.latest/styles/wijmo.min.css">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="http://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="http://cdn.wijmo.com/5.latest/controls/wijmo.min.js"></script>
<script src="http://cdn.wijmo.com/5.latest/controls/wijmo.input.min.js"></script>
<script src="http://cdn.wijmo.com/5.latest/controls/wijmo.grid.min.js"></script>
<script src="http://cdn.wijmo.com/5.latest/interop/angular/wijmo.angular.min.js"></script>
<div ng-app="app">
<div ng-controller="appCtrl">
<wj-flex-grid items-source="data" control="flex">
<wj-flex-grid-column header="Country" binding="country">
<wj-flex-grid-cell-template cell-type="CellEdit">
<wj-combo-box items-source="country"
selected-index="0"
is-editable="true"
ng-model="utx.country">
</wj-combo-box>
</wj-flex-grid-cell-template>
</wj-flex-grid-column>
<wj-flex-grid-column header="Download" binding="downloads">
<wj-flex-grid-cell-template cell-type="CellEdit">
<wj-input-number value="$value" ng-model="utx.downloads" control="input"></wj-input-number>
</wj-flex-grid-cell-template>
</wj-flex-grid-column>
</wj-flex-grid>
Value using ng-model {{utx}}
</div>
</div>
JavaScript
var getData = function (value) {
var countries = 'India,Japan,UK,US,China'.split(','),
data = [];
for (var i = 0; i < value; i++) {
data.push({
id: i + 1,
country: countries[i % countries.length],
sales: Math.random() * 10000,
downloads: Math.random() * 200,
active: i % 3 == 0
});
}
return data;
};
var getCountry = function () {
var countries = 'India,Japan,UK,US,China'.split(',')
return countries;
};
var app = angular.module('app', ['wj']);
app.controller('appCtrl', function ($scope) {
$scope.data =new wijmo.collections.CollectionView(getData(5));
$scope.country = new wijmo.collections.CollectionView(getCountry());
$scope.utx = {
country: null, downloads:0
};
});