if ll_found>0 then
string ls_label
long ll_id,ll_pid
integer li_lv,li_ord
long ll_handle
int i
treeviewitem l_tvi
for i=ll_found to ids_cata.rowCount()
ls_label=ids_cata.object.cata_nm[i]
ll_id=ids_cata.object.cata_id[i]
ll_pid =ids_cata.object.parent_id[i]
if ll_pid = al_cataid then
l_tvi.label = ls_label
l_tvi.data = "c"+String(ll_id)
l_tvi.pictureindex = 2
l_tvi.selectedpictureindex = 3
ll_handle = atv.insertitemlast(ai_phandle,l_tvi)
wf_buildnextlevel(atv,ll_id,ll_handle,ai_type)
end if
next
return ll_handle
else
return ll_found
end if