If possible, how to add RadiobuttonGroup with texts in a TMSFNCGrid cell

Hi,

This can be done via custom editing.

TMSFNCGrid1.DefaultRowHeight := 100;

procedure TForm1.TMSFNCGrid1CellEditGetData(Sender: TObject; ACol,
  ARow: Integer; CellEditor: TWinControl; var CellString: string);
var
  i: integer;
begin
  if TryStrToInt(CellString, i) then
  begin
    (CellEditor as TRadioGroup).Parent := TMSFNCGrid1;
    (CellEditor as TRadioGroup).ItemIndex := i;
    (CellEditor as TRadioGroup).Parent := nil;
  end;
end;

procedure TForm1.TMSFNCGrid1CellEditSetData(Sender: TObject; ACol,
  ARow: Integer; CellEditor: TWinControl; var CellString: string);
begin
  CellString := (CellEditor as TRadioGroup).ItemIndex.ToString;
end;

procedure TForm1.TMSFNCGrid1GetCellEditorCustomClassType(Sender: TObject;
  ACol, ARow: Integer; var CellEditorCustomClassType: TTMSFNCGridEditorClass);
begin
  CellEditorCustomClassType := TRadioGroup;
end;

procedure TForm1.TMSFNCGrid1GetCellEditorProperties(Sender: TObject; ACol,
  ARow: Integer; CellEditor: TWinControl);
begin
  (CellEditor as TRadioGroup).Parent := TMSFNCGrid1;
  (CellEditor as TRadioGroup).Items.Add('Item 1');
  (CellEditor as TRadioGroup).Items.Add('Item 2');
  (CellEditor as TRadioGroup).Items.Add('Item 3');
  (CellEditor as TRadioGroup).Items.Add('Item 4');
  (CellEditor as TRadioGroup).Parent := nil;
end;

procedure TForm1.TMSFNCGrid1GetCellEditorType(Sender: TObject; ACol,
  ARow: Integer; var CellEditorType: TTMSFNCGridEditorType);
begin
  CellEditorType := etCustom;
end;

image