Grid - Pre Sale Questions
Custom inplace editor
Thread Starter: Krstic Started: 10/9/2007 11:34 AM UTC
Replies: 1
Custom inplace editor
I plan to use Raize Combobox as custom editor in Profgrid.
Problem is: how to set / read Combobox ' values' property, or, generaly, how to access properties of custom inplace editor. 

Re: Custom inplace editor
Hello Krstic,

The custom inplace editor is accessible in OnGetEditControlText and OnGetEditControlResult events via the AControl parameter.

procedure TForm1.ProfGrid1GetEditControlText(Sender: TProfGrid; ACol,
 ARow: Integer; AControl: TWinControl; var AText: WideString;
 var DoSetText: Boolean);
begin
 if AControl is TComboBox then
 begin
   (AControl as TComboBox).Clear;
   (AControl as TComboBox).AddItem('Item 1', nil);
   (AControl as TComboBox).AddItem('Item 2', nil);
   (AControl as TComboBox).AddItem('Item 3', nil);
 end
end;


-Nicholas