listView.addEventListener('itemclick', function(e){
var section = e.section;
var itenIndex = e.itemIndex;
var dialog = Ti.UI.createAlertDialog({
title : 'Do you want to delete the row?',
buttonNames : ['Yes','No']
});
dialog.addEventListener('click', function(e){
if(e.index == 0){
section.deleteItemsAt(itenIndex,1);
}
});
dialog.show();
});
Delete a list view Row Titanium
-
06-07-2023 - |
Question
I want to delete a row in list view. When user clicks a row I want to open a Dialog showing the message that 'sure you want to delete'. When user clicks ok then the Row should be deleted.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow