When you say 'data available rows', what do you mean? It seems to me you mean that itemObj will not always have data in it?
If this is the case, then you need to wrap the adding of the text field in an if block:
if(itemObj ~= nil) then
--Adding textField code
end
Also, this function seems to render a single row. So you would need to wrap it in a for loop. Something like
local i;
--The # means 'length of'
for i=1, #yourDataSource do
onRowRender(yourItemData)
end