I am facing a strange behavior of JQuery, I am sure it is related with JQuery not with jtable which I am using for whole of my implementation.
I have two columns for editing and deleting which I customized and replaced with jTabel default functionality. As soon as I click the edit button , The dailog appears for edit. I cancel and again click on any part of the jtabel's row, it again opens the same dialog which I opened before for editing the record. Moreover, If I click afterwards 'delete' button, it again opens the same dialog ( i.e edit ) dialog.
I have searched , people said to use $("dialog-form").dialog('destroy').remove(); it works, but after wards again I cannot interact with the edit dialog , as It's div is completely removed. I also tried only with $("dialog-form").destroy(''). It has totally weird behavior. Because of it, my Partial View is not rendered on JQuery Dialog which I am doing on it's "open" method, Instead it dispatches the whole HTML before jtable.
Moreover, I have observed strongly related issue, If I click delete first and then click edit, it opens previously delete form and pops up the edit form as well on each other.
Attached image (When Delete clicked after editing)
The edit dialog box opens even i clicked jtable's row and not clicking on the icon of delete on jtable's delete column.