If you put data into a STringGrid insted of ListView you may edit the Cells directly without to use Panel1 and Edit1 and Edit2
To allow editting: StrGrid.Options := [goFixedVertLine,goFixedHo
procedure TForm1.Button1Click(Sender
var
R: Integer;
begin
ADOMain.Active := False;
ADOMain.SQL.Text := 'select * from Items where ITEMTYPE = ''Labor'' order by ITEMNAME';
ADOMain.Active := True;
R := 0;
StrGrid.Cells[0,R] := 'ITEMID';
StrGrid.Cells[1,R] := 'ITEMNAME';
StrGrid.Cells[2,R] := 'ITEMDESCRIPTION';
while not ADOMain.Eof do
begin
Inc(R);
StrGrid.RowCount := Succ(R);
StrGrid.Cells[0,R] := ADOMain.FieldByName('ITEMI
StrGrid.Cells[1,R] := ADOMain.FieldByName('ITEMN
StrGrid.Cells[2,R] := ADOMain.FieldByName('ITEMD
ADOMain.Next;
end;
// ADOMain.Close;
end;
Emil
Main Topics
Browse All Topics





by: MFriesePosted on 2004-12-05 at 07:56:41ID: 12748565
Sorry, I cannot really help at the moment with your problem, but here's a small hint for you:
irtualTree view/VT.ph p since it has I think all you need inbound. It's free, very very fast and has very many functions. At least you'd have to learn how to use it for a couple of hours but after that you'll never want to miss it. If you need help with that, maybe I can help :)
You might want to use Virtual Treeview Component http://www.soft-gems.net/V