I installed the latest KGrid (v. 1.7) and works. The big *.zip from author contains *.lpk (as well as *.dpk) files and also *.pdf file where inplace controls are well documented.
Inplace editor works differently than with TStringGrid. When you need inplace editor you must use event:
OnEditorCreate
- here you create TEdit, TButton or whatever
Following example is with TSpinEdit:
procedure TForm1.KGrid1EditorCreate(Sender: TObject; ACol, ARow: Integer;
var AEditor: TWinControl);
begin
AEditor:=TSpinEdit.Create(nil);
end;
procedure TForm1.KGrid1EditorDataFromGrid(Sender: TObject;
AEditor: TWinControl; ACol, ARow: Integer; var AssignText: Boolean);
var s: string;
begin
s:=KGrid1.Cells[aCol, aRow];
if s='' then TSpinEdit(AEditor).Value:=0
else TSpinEdit(AEditor).Value:=strtoint(s);
end;
procedure TForm1.KGrid1EditorDataToGrid(Sender: TObject; AEditor: TWinControl;
ACol, ARow: Integer; var AssignText: Boolean);
begin
KGrid1.Cells[aCol, aRow]:=inttostr(TSpinEdit(AEditor).Value);
end;
Author says that it is not necessary do anything in
OnEditorDestroy and seems true (I checked with heaptrace).