Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How to clear selected records on button click event in angular


addDisplayAttrToDetailsGrid(list: any) {

let items = this.addedAttributes ForDetails.filter(i => i.ProductCode == list. ProductCode && i.ScriptName ==list.ScriptNam

if (items.length > 0) {

this.addedAttributes ForDetails[this.addedAttributes ForDetails.indexOf(items[0])].Attributes = list.Attributes;

}

else {

this.addedAttributes ForDetails.push(list);

I


What I have tried:

<pre>How to clear selected records on button click event in angular


addDisplayAttrToDetailsGrid(list: any) {

let items = this.addedAttributes ForDetails.filter(i => i.ProductCode == list. ProductCode && i.ScriptName ==list.ScriptNam

if (items.length > 0) {

this.addedAttributes ForDetails[this.addedAttributes ForDetails.indexOf(items[0])].Attributes = list.Attributes;

}

else {

this.addedAttributes ForDetails.push(list);

I
Posted
Comments
OriginalGriff 12-Apr-23 11:33am    
And?
What does it do that you didn't expect, or not do that you did?
What have you tried to do to find out why?
Are there any error messages, and if so, where and when? What did you do to make them happen?

This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
Use the "Improve question" widget to edit your question and provide better information.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900