When I remove and then, add a row on tableview, it adds the removed row











up vote
-1
down vote

favorite












I am trying to let the user edit a tableview, which is adding and removing rows.



That works. But if I remove a row and then add, the inserted row has the info of the deleted row. Is literally the deleted row.



What I am doing wrong?



@IBAction func addArticle(_ sender: UIButton) {
numItems += 1
let indexPath = IndexPath(row: numItems - 1, section: 0)
myTableView.beginUpdates()
myTableView.insertRows(at: [indexPath], with: .automatic)
myTableView.endUpdates()
view.endEditing(true)
}

@objc func removeArticle(sender: UIButton) {
numItems -= 1
let indexPath = IndexPath(row: sender.tag, section: 0)
myTableView.beginUpdates()
myTableView.deleteRows(at: [indexPath], with: .automatic)
myTableView.endUpdates()
}


The datasource and delegate for the tableview as follows:



extension MyViewController: UITableViewDataSource, UITableViewDelegate{
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return numItems
}

func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
return true
}

func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {
if editingStyle == .delete {
numItems -= 1
self.myTableView.beginUpdates()
self.myTableView.deleteRows(at: [indexPath], with: .automatic)
self.myTableView.endUpdates()
}
}

func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
if firstUse{
firstUse = false
}
}

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! MyTableViewCell

if firstUse{
//setting cell
//...
cell.name.isEnabled = false
cell.name.textColor = UIColor.gray
cell.unit.text = //something
}

return initCell(cell: cell, indexPath: indexPath)
}

func initCell(cell: MyTableViewCell, indexPath: IndexPath) -> MyTableViewCell {
cell.name.inputAccessoryView = addDoneToolbarKeyboard()
cell.amount.inputAccessoryView = addDoneToolbarKeyboard()

cell.name.filterStrings(getFilteredBy())
cell.minusButton.tag = indexPath.row
cell.minusButton.addTarget(self, action: #selector(self.removeArticle), for: .touchUpInside)
cell.name.itemSelectionHandler = { filteredResults, itemPosition in
//irrelevant code
}
}

return cell
}


}



Thank you in advance.










share|improve this question
























  • The documentation on insertRows (developer.apple.com/documentation/uikit/uitableview/…) says this method calls the relevant datasource and delegate methods. Can you add your datasource delegate information? Do you use cellForRow (developer.apple.com/documentation/uikit/uitableview/…)?
    – Jason
    Nov 19 at 20:10












  • Updated info. Is that the one you are taking about?
    – Amg91
    Nov 19 at 20:29










  • As always, beginUpdates() and endUpdates() is syntactic sugar in this case. It has no effect at all.
    – vadian
    Nov 19 at 20:38










  • Not sure what you meant. But it adds and removes rows. On all the places where I have searched, they use begin and end. Is not this correct?
    – Amg91
    Nov 19 at 20:40










  • No, it's not correct (although it causes no harm) . There are many tutorials which suggest this nonsense. Both methods are required if multiple insert/delete/move operations are performed simultaneously, only there. In your case it's pointless.
    – vadian
    Nov 19 at 20:45

















up vote
-1
down vote

favorite












I am trying to let the user edit a tableview, which is adding and removing rows.



That works. But if I remove a row and then add, the inserted row has the info of the deleted row. Is literally the deleted row.



What I am doing wrong?



@IBAction func addArticle(_ sender: UIButton) {
numItems += 1
let indexPath = IndexPath(row: numItems - 1, section: 0)
myTableView.beginUpdates()
myTableView.insertRows(at: [indexPath], with: .automatic)
myTableView.endUpdates()
view.endEditing(true)
}

@objc func removeArticle(sender: UIButton) {
numItems -= 1
let indexPath = IndexPath(row: sender.tag, section: 0)
myTableView.beginUpdates()
myTableView.deleteRows(at: [indexPath], with: .automatic)
myTableView.endUpdates()
}


The datasource and delegate for the tableview as follows:



extension MyViewController: UITableViewDataSource, UITableViewDelegate{
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return numItems
}

func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
return true
}

func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {
if editingStyle == .delete {
numItems -= 1
self.myTableView.beginUpdates()
self.myTableView.deleteRows(at: [indexPath], with: .automatic)
self.myTableView.endUpdates()
}
}

func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
if firstUse{
firstUse = false
}
}

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! MyTableViewCell

if firstUse{
//setting cell
//...
cell.name.isEnabled = false
cell.name.textColor = UIColor.gray
cell.unit.text = //something
}

return initCell(cell: cell, indexPath: indexPath)
}

func initCell(cell: MyTableViewCell, indexPath: IndexPath) -> MyTableViewCell {
cell.name.inputAccessoryView = addDoneToolbarKeyboard()
cell.amount.inputAccessoryView = addDoneToolbarKeyboard()

cell.name.filterStrings(getFilteredBy())
cell.minusButton.tag = indexPath.row
cell.minusButton.addTarget(self, action: #selector(self.removeArticle), for: .touchUpInside)
cell.name.itemSelectionHandler = { filteredResults, itemPosition in
//irrelevant code
}
}

return cell
}


}



Thank you in advance.










share|improve this question
























  • The documentation on insertRows (developer.apple.com/documentation/uikit/uitableview/…) says this method calls the relevant datasource and delegate methods. Can you add your datasource delegate information? Do you use cellForRow (developer.apple.com/documentation/uikit/uitableview/…)?
    – Jason
    Nov 19 at 20:10












  • Updated info. Is that the one you are taking about?
    – Amg91
    Nov 19 at 20:29










  • As always, beginUpdates() and endUpdates() is syntactic sugar in this case. It has no effect at all.
    – vadian
    Nov 19 at 20:38










  • Not sure what you meant. But it adds and removes rows. On all the places where I have searched, they use begin and end. Is not this correct?
    – Amg91
    Nov 19 at 20:40










  • No, it's not correct (although it causes no harm) . There are many tutorials which suggest this nonsense. Both methods are required if multiple insert/delete/move operations are performed simultaneously, only there. In your case it's pointless.
    – vadian
    Nov 19 at 20:45















up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











I am trying to let the user edit a tableview, which is adding and removing rows.



That works. But if I remove a row and then add, the inserted row has the info of the deleted row. Is literally the deleted row.



What I am doing wrong?



@IBAction func addArticle(_ sender: UIButton) {
numItems += 1
let indexPath = IndexPath(row: numItems - 1, section: 0)
myTableView.beginUpdates()
myTableView.insertRows(at: [indexPath], with: .automatic)
myTableView.endUpdates()
view.endEditing(true)
}

@objc func removeArticle(sender: UIButton) {
numItems -= 1
let indexPath = IndexPath(row: sender.tag, section: 0)
myTableView.beginUpdates()
myTableView.deleteRows(at: [indexPath], with: .automatic)
myTableView.endUpdates()
}


The datasource and delegate for the tableview as follows:



extension MyViewController: UITableViewDataSource, UITableViewDelegate{
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return numItems
}

func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
return true
}

func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {
if editingStyle == .delete {
numItems -= 1
self.myTableView.beginUpdates()
self.myTableView.deleteRows(at: [indexPath], with: .automatic)
self.myTableView.endUpdates()
}
}

func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
if firstUse{
firstUse = false
}
}

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! MyTableViewCell

if firstUse{
//setting cell
//...
cell.name.isEnabled = false
cell.name.textColor = UIColor.gray
cell.unit.text = //something
}

return initCell(cell: cell, indexPath: indexPath)
}

func initCell(cell: MyTableViewCell, indexPath: IndexPath) -> MyTableViewCell {
cell.name.inputAccessoryView = addDoneToolbarKeyboard()
cell.amount.inputAccessoryView = addDoneToolbarKeyboard()

cell.name.filterStrings(getFilteredBy())
cell.minusButton.tag = indexPath.row
cell.minusButton.addTarget(self, action: #selector(self.removeArticle), for: .touchUpInside)
cell.name.itemSelectionHandler = { filteredResults, itemPosition in
//irrelevant code
}
}

return cell
}


}



Thank you in advance.










share|improve this question















I am trying to let the user edit a tableview, which is adding and removing rows.



That works. But if I remove a row and then add, the inserted row has the info of the deleted row. Is literally the deleted row.



What I am doing wrong?



@IBAction func addArticle(_ sender: UIButton) {
numItems += 1
let indexPath = IndexPath(row: numItems - 1, section: 0)
myTableView.beginUpdates()
myTableView.insertRows(at: [indexPath], with: .automatic)
myTableView.endUpdates()
view.endEditing(true)
}

@objc func removeArticle(sender: UIButton) {
numItems -= 1
let indexPath = IndexPath(row: sender.tag, section: 0)
myTableView.beginUpdates()
myTableView.deleteRows(at: [indexPath], with: .automatic)
myTableView.endUpdates()
}


The datasource and delegate for the tableview as follows:



extension MyViewController: UITableViewDataSource, UITableViewDelegate{
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return numItems
}

func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
return true
}

func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {
if editingStyle == .delete {
numItems -= 1
self.myTableView.beginUpdates()
self.myTableView.deleteRows(at: [indexPath], with: .automatic)
self.myTableView.endUpdates()
}
}

func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
if firstUse{
firstUse = false
}
}

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! MyTableViewCell

if firstUse{
//setting cell
//...
cell.name.isEnabled = false
cell.name.textColor = UIColor.gray
cell.unit.text = //something
}

return initCell(cell: cell, indexPath: indexPath)
}

func initCell(cell: MyTableViewCell, indexPath: IndexPath) -> MyTableViewCell {
cell.name.inputAccessoryView = addDoneToolbarKeyboard()
cell.amount.inputAccessoryView = addDoneToolbarKeyboard()

cell.name.filterStrings(getFilteredBy())
cell.minusButton.tag = indexPath.row
cell.minusButton.addTarget(self, action: #selector(self.removeArticle), for: .touchUpInside)
cell.name.itemSelectionHandler = { filteredResults, itemPosition in
//irrelevant code
}
}

return cell
}


}



Thank you in advance.







ios swift uitableview






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 19 at 20:59

























asked Nov 19 at 19:58









Amg91

99115




99115












  • The documentation on insertRows (developer.apple.com/documentation/uikit/uitableview/…) says this method calls the relevant datasource and delegate methods. Can you add your datasource delegate information? Do you use cellForRow (developer.apple.com/documentation/uikit/uitableview/…)?
    – Jason
    Nov 19 at 20:10












  • Updated info. Is that the one you are taking about?
    – Amg91
    Nov 19 at 20:29










  • As always, beginUpdates() and endUpdates() is syntactic sugar in this case. It has no effect at all.
    – vadian
    Nov 19 at 20:38










  • Not sure what you meant. But it adds and removes rows. On all the places where I have searched, they use begin and end. Is not this correct?
    – Amg91
    Nov 19 at 20:40










  • No, it's not correct (although it causes no harm) . There are many tutorials which suggest this nonsense. Both methods are required if multiple insert/delete/move operations are performed simultaneously, only there. In your case it's pointless.
    – vadian
    Nov 19 at 20:45




















  • The documentation on insertRows (developer.apple.com/documentation/uikit/uitableview/…) says this method calls the relevant datasource and delegate methods. Can you add your datasource delegate information? Do you use cellForRow (developer.apple.com/documentation/uikit/uitableview/…)?
    – Jason
    Nov 19 at 20:10












  • Updated info. Is that the one you are taking about?
    – Amg91
    Nov 19 at 20:29










  • As always, beginUpdates() and endUpdates() is syntactic sugar in this case. It has no effect at all.
    – vadian
    Nov 19 at 20:38










  • Not sure what you meant. But it adds and removes rows. On all the places where I have searched, they use begin and end. Is not this correct?
    – Amg91
    Nov 19 at 20:40










  • No, it's not correct (although it causes no harm) . There are many tutorials which suggest this nonsense. Both methods are required if multiple insert/delete/move operations are performed simultaneously, only there. In your case it's pointless.
    – vadian
    Nov 19 at 20:45


















The documentation on insertRows (developer.apple.com/documentation/uikit/uitableview/…) says this method calls the relevant datasource and delegate methods. Can you add your datasource delegate information? Do you use cellForRow (developer.apple.com/documentation/uikit/uitableview/…)?
– Jason
Nov 19 at 20:10






The documentation on insertRows (developer.apple.com/documentation/uikit/uitableview/…) says this method calls the relevant datasource and delegate methods. Can you add your datasource delegate information? Do you use cellForRow (developer.apple.com/documentation/uikit/uitableview/…)?
– Jason
Nov 19 at 20:10














Updated info. Is that the one you are taking about?
– Amg91
Nov 19 at 20:29




Updated info. Is that the one you are taking about?
– Amg91
Nov 19 at 20:29












As always, beginUpdates() and endUpdates() is syntactic sugar in this case. It has no effect at all.
– vadian
Nov 19 at 20:38




As always, beginUpdates() and endUpdates() is syntactic sugar in this case. It has no effect at all.
– vadian
Nov 19 at 20:38












Not sure what you meant. But it adds and removes rows. On all the places where I have searched, they use begin and end. Is not this correct?
– Amg91
Nov 19 at 20:40




Not sure what you meant. But it adds and removes rows. On all the places where I have searched, they use begin and end. Is not this correct?
– Amg91
Nov 19 at 20:40












No, it's not correct (although it causes no harm) . There are many tutorials which suggest this nonsense. Both methods are required if multiple insert/delete/move operations are performed simultaneously, only there. In your case it's pointless.
– vadian
Nov 19 at 20:45






No, it's not correct (although it causes no harm) . There are many tutorials which suggest this nonsense. Both methods are required if multiple insert/delete/move operations are performed simultaneously, only there. In your case it's pointless.
– vadian
Nov 19 at 20:45














1 Answer
1






active

oldest

votes

















up vote
0
down vote













I'm not seeing a use of indexPath in your initCell method (other than setting cell.minusButton.tag). Typically you use the indexPath as an index to an array of data, or something similar along those lines. I would be able to tell for sure if I could see where your table gets its data, but judging from that and the way you call names = Array() and amounts = Array(), I'm guessing that you are not updating your data model when you add something to the table. The table dequeues the cell and gets the deleted data. Since the data model feeding the cell is not updated, it creates the same cell and displays it






share|improve this answer





















  • The thing is, the user adds rows on the tableview that contains textFields to input text (that is why I am not filling the tableview with info, because the user inputs it). After a few types, the user can select from the filtered array. After that, the textfield is disabled.
    – Amg91
    Nov 19 at 20:53










  • So, can I add a brand new row?
    – Amg91
    Nov 19 at 20:54










  • I removed the names and amouns due to no longer used...
    – Amg91
    Nov 19 at 21:00










  • Ok, I'm following along. Now where are you storing information regarding user input (i.e. the user's array selection or the value in the text field)?
    – Jason
    Nov 19 at 21:48










  • Each time the user input text and select it from the filtered data, I get certain info. After user click save, i send it to the server.
    – Amg91
    Nov 19 at 21:52











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53381776%2fwhen-i-remove-and-then-add-a-row-on-tableview-it-adds-the-removed-row%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













I'm not seeing a use of indexPath in your initCell method (other than setting cell.minusButton.tag). Typically you use the indexPath as an index to an array of data, or something similar along those lines. I would be able to tell for sure if I could see where your table gets its data, but judging from that and the way you call names = Array() and amounts = Array(), I'm guessing that you are not updating your data model when you add something to the table. The table dequeues the cell and gets the deleted data. Since the data model feeding the cell is not updated, it creates the same cell and displays it






share|improve this answer





















  • The thing is, the user adds rows on the tableview that contains textFields to input text (that is why I am not filling the tableview with info, because the user inputs it). After a few types, the user can select from the filtered array. After that, the textfield is disabled.
    – Amg91
    Nov 19 at 20:53










  • So, can I add a brand new row?
    – Amg91
    Nov 19 at 20:54










  • I removed the names and amouns due to no longer used...
    – Amg91
    Nov 19 at 21:00










  • Ok, I'm following along. Now where are you storing information regarding user input (i.e. the user's array selection or the value in the text field)?
    – Jason
    Nov 19 at 21:48










  • Each time the user input text and select it from the filtered data, I get certain info. After user click save, i send it to the server.
    – Amg91
    Nov 19 at 21:52















up vote
0
down vote













I'm not seeing a use of indexPath in your initCell method (other than setting cell.minusButton.tag). Typically you use the indexPath as an index to an array of data, or something similar along those lines. I would be able to tell for sure if I could see where your table gets its data, but judging from that and the way you call names = Array() and amounts = Array(), I'm guessing that you are not updating your data model when you add something to the table. The table dequeues the cell and gets the deleted data. Since the data model feeding the cell is not updated, it creates the same cell and displays it






share|improve this answer





















  • The thing is, the user adds rows on the tableview that contains textFields to input text (that is why I am not filling the tableview with info, because the user inputs it). After a few types, the user can select from the filtered array. After that, the textfield is disabled.
    – Amg91
    Nov 19 at 20:53










  • So, can I add a brand new row?
    – Amg91
    Nov 19 at 20:54










  • I removed the names and amouns due to no longer used...
    – Amg91
    Nov 19 at 21:00










  • Ok, I'm following along. Now where are you storing information regarding user input (i.e. the user's array selection or the value in the text field)?
    – Jason
    Nov 19 at 21:48










  • Each time the user input text and select it from the filtered data, I get certain info. After user click save, i send it to the server.
    – Amg91
    Nov 19 at 21:52













up vote
0
down vote










up vote
0
down vote









I'm not seeing a use of indexPath in your initCell method (other than setting cell.minusButton.tag). Typically you use the indexPath as an index to an array of data, or something similar along those lines. I would be able to tell for sure if I could see where your table gets its data, but judging from that and the way you call names = Array() and amounts = Array(), I'm guessing that you are not updating your data model when you add something to the table. The table dequeues the cell and gets the deleted data. Since the data model feeding the cell is not updated, it creates the same cell and displays it






share|improve this answer












I'm not seeing a use of indexPath in your initCell method (other than setting cell.minusButton.tag). Typically you use the indexPath as an index to an array of data, or something similar along those lines. I would be able to tell for sure if I could see where your table gets its data, but judging from that and the way you call names = Array() and amounts = Array(), I'm guessing that you are not updating your data model when you add something to the table. The table dequeues the cell and gets the deleted data. Since the data model feeding the cell is not updated, it creates the same cell and displays it







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 19 at 20:42









Jason

469315




469315












  • The thing is, the user adds rows on the tableview that contains textFields to input text (that is why I am not filling the tableview with info, because the user inputs it). After a few types, the user can select from the filtered array. After that, the textfield is disabled.
    – Amg91
    Nov 19 at 20:53










  • So, can I add a brand new row?
    – Amg91
    Nov 19 at 20:54










  • I removed the names and amouns due to no longer used...
    – Amg91
    Nov 19 at 21:00










  • Ok, I'm following along. Now where are you storing information regarding user input (i.e. the user's array selection or the value in the text field)?
    – Jason
    Nov 19 at 21:48










  • Each time the user input text and select it from the filtered data, I get certain info. After user click save, i send it to the server.
    – Amg91
    Nov 19 at 21:52


















  • The thing is, the user adds rows on the tableview that contains textFields to input text (that is why I am not filling the tableview with info, because the user inputs it). After a few types, the user can select from the filtered array. After that, the textfield is disabled.
    – Amg91
    Nov 19 at 20:53










  • So, can I add a brand new row?
    – Amg91
    Nov 19 at 20:54










  • I removed the names and amouns due to no longer used...
    – Amg91
    Nov 19 at 21:00










  • Ok, I'm following along. Now where are you storing information regarding user input (i.e. the user's array selection or the value in the text field)?
    – Jason
    Nov 19 at 21:48










  • Each time the user input text and select it from the filtered data, I get certain info. After user click save, i send it to the server.
    – Amg91
    Nov 19 at 21:52
















The thing is, the user adds rows on the tableview that contains textFields to input text (that is why I am not filling the tableview with info, because the user inputs it). After a few types, the user can select from the filtered array. After that, the textfield is disabled.
– Amg91
Nov 19 at 20:53




The thing is, the user adds rows on the tableview that contains textFields to input text (that is why I am not filling the tableview with info, because the user inputs it). After a few types, the user can select from the filtered array. After that, the textfield is disabled.
– Amg91
Nov 19 at 20:53












So, can I add a brand new row?
– Amg91
Nov 19 at 20:54




So, can I add a brand new row?
– Amg91
Nov 19 at 20:54












I removed the names and amouns due to no longer used...
– Amg91
Nov 19 at 21:00




I removed the names and amouns due to no longer used...
– Amg91
Nov 19 at 21:00












Ok, I'm following along. Now where are you storing information regarding user input (i.e. the user's array selection or the value in the text field)?
– Jason
Nov 19 at 21:48




Ok, I'm following along. Now where are you storing information regarding user input (i.e. the user's array selection or the value in the text field)?
– Jason
Nov 19 at 21:48












Each time the user input text and select it from the filtered data, I get certain info. After user click save, i send it to the server.
– Amg91
Nov 19 at 21:52




Each time the user input text and select it from the filtered data, I get certain info. After user click save, i send it to the server.
– Amg91
Nov 19 at 21:52


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53381776%2fwhen-i-remove-and-then-add-a-row-on-tableview-it-adds-the-removed-row%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Feedback on college project

Futebolista

Albești (Vaslui)