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
Rajesh Gami
81
24.4k
1.3m
How to update multiple record in angular 5
Dec 6 2018 6:36 AM
How to update multiple record in angular 5.
below code for single row update.
editCustomTableRecord(index, record) {
debugger
;
let filteredArray =
this
.CustomTables.customTableFieldList.filter(i => i.isKey ==
true
);
if
(filteredArray.length > 0) {
if
(
this
.customTableRecordIds ==
null
) {
this
.customTableRecordIds = index +
","
;
}
else
{
this
.customTableRecordIds += index +
","
;
}
this
.editCustomRecord = record;
this
.editRecord[index] =
true
;
}
else
{
swal(
);
}
}
and now below code for multiple record save:
saveAllCustomTableRecord() {
debugger
;
this
.customTableRecordIds.forEach(customTableRecordId => {
if
(customTableRecordId !=
','
) {
this
.clixzService.customtablerecordService.putCustomTableRecord(
this
.customTableId,
this
.CustomTableRecords[customTableRecordId]).then(customeRecord => {
this
.responseModel.createObject(customeRecord);
if
(
this
.responseModel.isError ==
false
) {
this
.editRecord[customTableRecordId] =
false
;
}
else
{
swal(
'Opps...'
,
''
,
'error'
);
}
});
}
});
}
but does not save data. already get customTableRecordIds.
Reply
Answers (
1
)
How to Simply Loops in typescript
quantity price tax discount=total, calculations