0

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?enter image description here

2
  • your question is not very much clear. please elaborate your query. Also post some of your code that you have tried Commented 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... Commented Sep 3, 2018 at 4:10

1 Answer 1

0

Accordin to the sample

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>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.