27-03-2011, 08:40 PM
توصلت الي الحل هذا هو الكود
كود :
var
N: TTreeNode;
begin
ADOTable1.Open;
ADOTable2.Open;
While not ADOTable1.Eof do
begin
N:= TreeView1.Items.AddChild(Nil,ADOTable1.Fields[1].AsString);
ADOTable2.first;
While not adotable2.Eof do
begin
if (ADOTable1.FieldByName('b_no').AsString=ADOTable2.FieldByName('b_no').AsString) then
TreeView1.Items.AddChild(N,adotable2.Fields[2].AsString);
adotable2.Next;
end;
ADOTable1.Next;
end;
