How to add drop-down and input field in the angular ui-grid table? If I have list of values coming as drop-down, if I want enter a new value which not available in drop-down through input field?
-
your question is not very much clear. please elaborate your query. Also post some of your code that you have triedSachet Gupta– Sachet Gupta2018-09-03 04:00:03 +00:00Commented Sep 3, 2018 at 4:00
-
I've drop-down in cell with 21,23,20,30,29 etc values,If need to enter 35age which not available in drop-down I need to enter manually?Could you pls expalin...rj26– rj262018-09-03 04:10:52 +00:00Commented Sep 3, 2018 at 4:10
Add a comment
|
1 Answer
it would be required to handle pushing new items to the editDropdownOptionsArray via needed action (edit or whatever) like that (the reference to the upper sample):
app.js
$scope.click = function(){
var optionsArray = $scope.gridOptions.columnDefs[2].editDropdownOptionsArray;
optionsArray.push('onemore '+ optionsArray.length);
}
index.html
<button ng-click="click()">Add new value</button>