I'm trying to use theTAdvMultiColumnDropDown as an inplaceEditor with a FormControlEditLink for my stringgrid. Everything looks great but I'm having an trouble getting the selected value back in to the grid cell. The text is showing but when I hit enter it just disappears.
In the FormsControlEditLink event GetEditorValue I have:
AValue := AdvMultiColumnDropDown1.Text;
I'm to concerned with SetEditorValue on this particuler control.
TMultiColumnDropDown.Verion = 1.3.2.1
TAdvStringGrid.Version = 7.4.3.5
Delphi 7
I retested this here and it worked fine with:
procedure TForm1.AdvStringGrid1GetEditorType(Sender: TObject; ACol,
ARow: Integer; var AEditor: TEditorType);
begin
AEditor := edCustom;
AdvStringGrid1.EditLink := FormControlEditLink1;
end;
procedure TForm1.FormControlEditLink1GetEditorValue(Sender: TObject;
Grid: TAdvStringGrid; var AValue: string);
begin
AValue := AdvMultiColumnDropDown1.Text;
end;
procedure TForm1.FormControlEditLink1SetEditorValue(Sender: TObject;
Grid: TAdvStringGrid; AValue: string);
begin
AdvMultiColumnDropDown1.Text := AValue;
end;
I found the problem. The Ole events will not trigger when the goEditing=true. When I turn off the goEditing the Ole works as it should.
goEditing=true, No Ole
goEditing=false, Yes Ole
I did not know there was a connection between OLE and the goEditing.
Thanks
Patrick
I retested with Patrick's suggestion but it did not have any effect.
Also the dropdown icon does not appear until you click the cell two or three times.
The other normal combo cells show this all the time.
I went back and created a small test app and this seems to be working, so perhaps I have some value set which is throwing this off.
goEditing should not affect OLE drag & drop.
As we can't reproduce a problem here with OLE drag & drop, please provide some sample source app with which we can reproduce this issue here.