

右图是该表的数据,左图是软件效果,请问我要如何实现对上层编号,上层名称的显示,以及,我要如何在DBLookupComboBox内显示两列数据,如图

或者说 其实这并不是DBLookupComboBox
select ttt.Typeno as 类型编号,ttt.TypeName,test1.typeno,test1.TypeName from test1 as ttt,test1
where ttt.ID in(
select ID from test1 where parentID in (
select ID from test1 where parentID = 0)
) and ttt.parentid=test1.id
union
select typeno,typename,'','' from test1 where parentID=0

