After editing boolean value in a particular row to select the row, we click on Delete icon above.
On delete icon click , the data is deleted from the database and we are refreshing a binding.
Please refer image “Before Delete.png”
I selected row with 20220324-00031
Clicked delete.
After delete icon click, row is removed from the table however table shows next row selected. (20220324-00030)
Please refer image “After Delete.png”
Shouldnt the refresh binding show edited cell data correctly ?
Am I missing something here ?
What is the script you have on the delete button to delete that row from the database? Could you share where you are calling refreshBinding as well? If possible, could you share the export of the view?
I think the problem is likely that your row selected property is independent of your data. It’s a property of the table, not the binding dataset / document.
Try setting each checkbox value to zero as you delete the rows.
Hi,
Yes, the script deletes a row from the database.
There are two custom properties on the table, one is sqlData which is bound to a query and other editedData.
Table’s data proerty is bound to editedData
On delete, row is deleted form table, we do a refreshBinding for sqlData . sqlData has ChangeScript which overwrites the editedData with selected = 0
The problem is the selected column where I had clicked to select is not updated until I navigate away from that column. Attached is view export. Test_Table_Delete_2022-03-29_0328.zip (20.2 KB)
Thanks for the suggestion, however setting value to 0 also does not work. Unless I navigate away from the clicked table cell, the new value is not shown.
It looks like what you’re seeing here is a visual bug where that boolean selection value is still displayed after the Perspective Table’s data property is refreshed. I’ve created an internal ticket for this on our end for that to get worked on. For a seamless workaround, I suggest toggling the “editable” property of your respective boolean column, which will clear that selection.
You can do this in the onClick script that you trigger on the delete button, but you’ll need to provide a small amount of time for the value to update to False on the component before setting it back to True. I had success with your project by setting the editable property to False at the top of your onClick script and then back to True at the very bottom.