Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Alloy Bound Tableview Delete Row from DB

$
0
0

Seems simple enough, but I am finding it difficult to locate resources which show how to do it. We want to display list of records from the DB (alloy), provide an edit and delete button (Imageview). On click, edit opens the edit screen and delete removes the record from the database. I added custom attribute record_id to imageview, but it does not seem to get passed in its event listener. We are displaying the records using bound tableview.

<TableView id="saleTable" dataCollection="Sales" editable="true" editing="true">
<TableViewRow>
    <View layout="horizontal">
         <Label text="{sale_date}"></Label>
         <Label text="{amount}"></Label>
         <ImageView id="delete" record_id="{id}" onClick="deleteRow" ></ImageView>
   </View>
</TableViewRow>
</TableView>
The delete button does not seem to appear for lower versions of android (2.3.3) which we need to target.

Please help.


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>