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
Mandar Shinde
NA
423
114.2k
Regarding getting Extra Total Value.
Apr 12 2019 5:37 AM
Dear All,
I was developing one component using Angular 5 and ASP .Net MVC with REST API.
I am facing one problem with my dynamic table.
My table looks like as follows -
When I am trying to insert any record then it looks like as follows -
To insert that record firtly I am saving that record in temporary Array.
To storing purpose I am using following code -
this
.itemToEdit.Items[index] = {
"GroupID"
:
this
.itemToEdit.Items[index].
GroupID
,
"ServiceID"
:
this
.itemToEdit.Items[index].
ServiceID
,
"RateEditable"
:
'0'
,
"MinRate"
: min,
"MaxRate"
: max,
"Rate"
: rates,
"Quantity"
: qty,
"Discount"
: discount,
"Total"
: total,
"Add"
:
false
};
var
rateItems = {
"GroupID"
:
""
,
"ServiceID"
:
""
,
"RateEditable"
:
""
,
"MinRate"
: 0,
"MaxRate"
: 0,
"Rate"
: 0,
"Quantity"
: 1,
"Discount"
: 0,
"Total"
: total,
"Add"
:
true
};
this
.itemToEdit.Items.push(rateItems);
Then it looks like as follows -
My issue is that if I set Total to o in rateItems dictionary then I get every Rate as 'Zero'.
If I pass any value to Total in rateItem dictionary then I am getting previously Added Rate.
I want to make it to zero but my pervious values shows me correct result.
Please let me know any easy solution. Any easy solution will be acceptable.
Thanking You in Advanced.
Reply
Answers (
2
)
HTML source for live commentry
how to change language?