Reputation: 2159
I'm building an app with appcelerator studio.
I have a TableView with some TableViewRow. So I have the last column that have an ImageView (delete.png), then I want that when the user click on this image, this row it is to delete.
So I have this code for the table:
<Alloy>
<View class="containerClinicalFolder" >
<TableView id="table" class="table" onClick="doClick">
<TableViewSection id="table" >
</TableViewSection>
</TableView>
<Button id="button" class="buttonLanguage" onClick="changeLanguage"
visible="false" traduzione="true"></Button>
</View>
</Alloy>
and this is the event:
function doClick(e){
if(e.source.apiName == "Ti.UI.ImageView"){
$.tableContact.deleteRow(e.index);
}
}
but not works
Upvotes: 3
Views: 93
Reputation: 182
I believe that line 3:
<TableView id="table" class="table" onClick="doClick">
Should be
<TableView id="table" class="table" onClick="doClick()">
Upvotes: 0