开发者

Delete TableViewRow in Titanium mobile

I have a TableView, but don't want to use the builtin swipe-to-delete functionality for various reasons. So, I have a button in that row that should delete the containing row. How would I do that? The TableView object has a deleteRow() function, but it requires the index of the row to be deleted, and as far as I know, there isn't a way to g开发者_运维问答et that from a TableViewRow object.


you could set the row index as a property of the button when you create the button

you could put the event listener on the whole row, detect when the source object is the button and then you would have the index and the button click event for the delete.

there are multiple approaches, some code would help me to direct you to the best solution

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜