Mahesh Reddy

Mahesh Reddy

  • NA
  • 363
  • 17.4k

Display values after clicking of edit button

Dec 17 2018 11:32 PM
I have one div 
<div>
<table>
 <tr>
<td>
 <inpu type="text" ng-model="Id">
</td> 
</tr> 
</table> 
</div> 
 
in grid view view i have 2 buttons
edit and button  
  
<button class="btn btn-success btn-sm " ng-click="ShowHide();" style="margin-left: 15px;">
Add
</button>
<button class="btn vtn-sm" ng-click="edit(Id)">
Edit
</button>
<script> 
  $scope.invoice = false;
$scope.ShowHide = function () {
$scope.invoice = $scope.invoice ? false : true;
}
$scope.edit = function (Id) {
debugger;
$scope.invoice = true;
}
 
Right now my requirement is after clicking of edit fnctionality i want display one form(above) with relevant values
in my eaxmple after clciking of edit button it was displaying form by default but values are not displaying
If i click on any textbox on above form then only values should be dsiplaying
I don't need like that 
Afrer clicking of edit button i want to display values without clciking any textbox 
  

Answers (2)