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 write loop for bind data to multiple rows in table
Sep 30 2016 2:20 AM
am getting table row index =1,
d.data=Amount:"1000",Party:81,Pendings:"400"
and c=81
c and Party are id of customer dropdown
if table index==1 ,then i want to pass id and index to bind values based on id,
and then for new row i want to pass index and id
how to write loop for this
js code
$scope.rvm = [{}];
//dropdown change event here
$scope.GetAccountBalance = function (index, c) {
//table row index here
var rowID = $scope.rvm.length;
//getting pending data from database based on customer
var getPendingData = ReceiptsService.GetPendings(c);
getPendingData.then(function (d) {
$scope.ReceiptsViewModel = d.data;
}, function (error) {
alert('Error');
});
//adding row on plus click
$scope.addRow = function (index,c) {
if ($scope.rvm.length == (index + 1)) {
$scope.rvm.push( {
});
}
}
$scope.deleteRow = function ($index) {
$scope.rvm.splice($index, 1);
}
Reply
Answers (
1
)
Want select combobox value
show data from dropdownlist to gridview using sqldatareader