Delete does not work when first load the grid

Delete does not work when first load the grid

kytankytan Posts: 6Questions: 3Answers: 0

Delete button does not work when first loading the grid. but if you were to edit the row or add a new row, then the same delete button will work.

When you select on a row and click delete button, a pop up will show asking "Are you sure you wish to delete 1 row?", if you click Delete button, nothing happen.

The Delete button will work only, if you edit any row and update it, if you go back to the same row, the Delete button will work.

Might be a bug?

Answers

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    Delete button does not work when first loading the grid

    The Editor examples on here are working correctly. There must be some error in your own code; you would have to post more details to get any help with debugging.

  • kytankytan Posts: 6Questions: 3Answers: 0

    if you refresh the page and do a delete, the pop up will show but click on "Delete" button does not do anything.
    If you click on a row and click edit and close it, then click on same row and Delete, the Pop up will show and Delete button will work.

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    if you refresh the page and do a delete

    What page? If you are using one of the examples on here, explain which example it is!

  • allanallan Posts: 63,889Questions: 1Answers: 10,530 Site admin

    My guess is that the server is not responding with the expected JSON, but as tangerine says we would really need more information - ideally a link to the page showing the issue please.

    Allan

  • Rob BrunRob Brun Posts: 56Questions: 2Answers: 14

    I am experiencing the exact same issue. I have two editors on the same page with the same configuration just different methods and data they connect to. One deletes as expected the other I have to edit or insert before the delete will function. The delete button in the delete notification is unresponsive. The Communication does not make it to the server and nothing appears in the Chrome console when you press the button. If am able to resolve this in some manner I will post back here.

    Shay

  • Rob BrunRob Brun Posts: 56Questions: 2Answers: 14

    Ok, this is what was happening in my case. In my editor I had a preSubmit event which I used to Run validation code.

    I neglected to check if(action !== 'remove') this was causing the delete to call the preSubmit event, fail validation, and return false.

    I think this may also explain why opening an edit and closing and then clicking delete would allow the delete to work. Because there were values in the fields which allowed it to pass validation.

    Shay

This discussion has been closed.