TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
suman goud
NA
176
54.1k
How to give condition to dropdown on adding new row
Sep 17 2016 12:51 AM
i have a table with dropdown and other controls
am adding new row on drop down change using angular js
<table id="myTable" class="tableData" border="0" cellpadding="0" cellspacing="0">
<tr>
<th>Customer</th>
<th>Pendings</th>
<th>Pending Value</th>
</tr>
<tr ng-repeat="r in rvm" @*ng- ng-class-odd="'odd'" ng-class-even="'even'"*@>
<td>
<select ng-model="ID" ng-change="GetAccountBalance()" style="width:150px;height:22px;" name=" tCustomer">
<option value="0">Select Customer</option>
<option value="1"> A</option>
</select>
</td>
<td>
<button type="button" class=" btn-sm" data-toggle="modal" ng-click="GetPendings(ReceiptsViewModel)" data-target="#ShowPendings">Pendings</button>
</td>
<td>
<span id="spAmount">{{ReceiptsViewModel.PendingAmount}}</span>
</td>
</tr>
</table>
angular code to add new row
var ReceiptsApp = angular.module('ReceiptsApp', []);
ReceiptsApp.controller('ReceiptsController', function ($scope) {
$scope.rvm = [{}];
$scope.GetAccountBalance = function () {
$scope.rvm.push({
});
}
});
but my requirement is,
if i select dropdown am adding new row that is fine,
but am changing value first dropdown again,it is adding one more row.
but i want like if i select first dropdown add row, then add new row on selecting dropdown in second row
now dont add rows on change of first and 2nd row dropdown
Reply
Answers (
6
)
Download Excel file on button click in windows form
et string length which takes from config file