Hey, this should hopefully give you a generally idea… But this example doesn’t have categories in… it just gets a name from a database and displays it in a general tableview.
Maybe if i get some time i’ll do categories too 
[code]
–Set some basic vars…
local siteName = {};
local int = 1
–Go through my database selecting all the site names…
local dbPath = system.pathForFile(“dipInfo.db3”, system.DocumentsDirectory)
local db = sqlite3.open( dbPath)
for row in db:nrows(“SELECT * FROM siteNames”) do
siteName[int] = row.name
int = int+1
end
db:close()
–Now create the widget.newTableView…
local listOptions = {
width = 320,
height = 420,
top = 46,
bgColor = {255,255,255,1},
maskFile = “images/maskfile.png”
}
list = widget.newTableView( listOptions )
–What happens when you touch a row…
local function onRowTouch( event )
local row = event.target; local rowGroup = event.view
if event.phase == “press” then
rowGroup.alpha = 0.5
elseif event.phase == “swipeLeft” or event.phase == “swipeRight” then
rowGroup.alpha = 1;
–here you could display a delete row button…
elseif event.phase == “release” or event.phase == “tap” then
–Now you can do whatever you want when you tap or click this row…
–maybe… event.target.name to get the name of the row you clicked etc.
end
return true
end
–The creation of each row…
local function onRowRender( event )
local row = event.target; row.id = event.index
local rowGroup = event.view
local circle = display.newCircle( 0, 0, 3 )
circle.y = row.height * 0.5; circle.x = 20; circle:setFillColor(1,87,141)
–Disply the sitename we got from our database…
local text = display.newRetinaText( siteName[event.index], 12, 0, “Helvetica”, 16 )
text:setReferencePoint( display.CenterLeftReferencePoint )
text.y = row.height * 0.5; text.x = 36; text:setTextColor(1,87,141,255)
row.name = siteName[event.index]
rowGroup:insert( circle ); rowGroup:insert( text )
end
–Go through the array we created making rows.
for i=1,#siteName do
list:insertRow{
onEvent=onRowTouch,
onRender=onRowRender,
height=58,
rowColor={255,255,255,25},
lineColor={200,200,200}
}
end
mainGroup:insert( list )
[/code] [import]uid: 69826 topic_id: 23297 reply_id: 93304[/import]