Here the code which i have used for show the tick mark in table row,On each row click tick mark showing and on other click its hiding.I added a button to select make all ticks visible(Select all),it not working
local function onRowRender( event ) local phase = event.phase local row = event.row chktick= display.newImage('images/kitchen/checktick.png',10,10); if(deviceName == "iPhone" or deviceName == "iPad") then chktick.x=303; chktick.isVisible = false; else chktick.x=303; chktick.isVisible = false; end chktick.y=row.contentHeight \* 0.5; row:insert(chktick); row:addEventListener("tap",onRowTouch); return true; end
local function onRowTouch( event ) local row = event.target; local \_chktick = event.target[6]; print("Comes here when touch"..row.index); if(flagvalue==1)then \_chktick.isVisible = true; flagvalue=0; else \_chktick.isVisible = false; flagvalue=1; end return true; end
Select all method
local function SelecetAllEventListener( event ) flagvalue=1; currentScene.reloadScene(); return true; end
Rowrender calling code
function scene:enterScene( event ) MenuID = event.params.currentMenuID; local group = self.view tableView = widget.newTableView { top = 85, left = 0, width = 320, height = 380, maskFile = "billmask.png", hideBackground = true, onRowRender = onRowRender, listener = tableViewListener, } end group:insert( tableView ) end
Please help me how to make visible all tick showable in using SelecetAllEventListener?