crdbgrid
Posted: Thu 21 Oct 2010 01:25
pop up component alters data in table.
procedure TForm1.RadioGroup2Click(Sender: TObject);
begin
// copy code to field from popup to the table
//
with mytable1 do begin;
if (state dsedit) then Edit;
FieldByName('Name').asstring:= radiogroup2.items[radiogroup2.itemindex] ;
if modified then post;
end;
radiogroup2.hide;
end;
// the changes are visible in the grid when the popup hides,
// but the changes are not committed to the table
// when you stop and restart the program. suggestions?
procedure TForm1.RadioGroup2Click(Sender: TObject);
begin
// copy code to field from popup to the table
//
with mytable1 do begin;
if (state dsedit) then Edit;
FieldByName('Name').asstring:= radiogroup2.items[radiogroup2.itemindex] ;
if modified then post;
end;
radiogroup2.hide;
end;
// the changes are visible in the grid when the popup hides,
// but the changes are not committed to the table
// when you stop and restart the program. suggestions?