AdvColumnGrid GridDropDown.DropDownWidth issue

I am using the AdvColumnGrid, and am trying to change its presentation from the defaults. I would like to hide the header and footer, and would like to set the drop down width.


I have found that this works:
  GridDropDown.DropDownSizeable := False;

But this does not:
  GridDropDown.DropDownWidth := 60;
  GridDropDown.DropDownFooter.Visible := False;

I've been experimenting, but without much success. I have found that in the case below:
procedure TForm2.AdvColumnGrid1GetEditorType(Sender: TObject; ACol, ARow: Integer; var AEditor: TEditorType);
begin
  case ACol of
    1:
    begin
      AEditor := edGridDropDown;
      AdvColumnGrid1.GridDropDown.DropDownHeader.Caption := 'Select...';
      AdvColumnGrid1.GridDropDown.DropDownWidth := 60;
      AdvColumnGrid1.FillGridEthnicity( AdvColumnGrid1.GridDropDown );
    end;
    2:
    begin
      AEditor := edGridDropDown;
      AdvColumnGrid1.GridDropDown.DropDownHeader.Caption := 'Select Grade...';
      AdvColumnGrid1.GridDropDown.DropDownWidth := 120;
      AdvColumnGrid1.GridDropDown.DropDownFooter.Visible := False;
      AdvColumnGrid1.FillGridGrades( AdvColumnGrid1.GridDropDown );
    end;
  end;
end;

If I select the column 2 dropdown first, then the DropDownwidth setting seems to work. But if I select the column 1 dropdown first, then when I use the column 2 dropdown, it has the same width as the column 1 dropdown. 

I have no problem with adding columns or items, nor with setting column widths. The problems I am having are all with the dropdown itself, with setting the visibility or caption of the header, the visibility of the footer, and the width of the entire dropdown.

You can hide header & footer with:

procedure TForm4.AdvStringGrid1GetEditorProp(Sender: TObject; ACol,
  ARow: Integer; AEditLink: TEditLink);
begin
  AdvStringGrid1.GridDropDown.DropDownHeader.Visible := false;
  AdvStringGrid1.GridDropDown.DropDownFooter.Visible := false;
  AdvStringGrid1.GridDropDown.DropDownAutoWidth := false;
  AdvStringGrid1.GridDropDown.DropDownWidth := 300;
end;

Thanks.


Is there a way to set the header font style of a TDropDownColumn separately from the font style of the rest of the column cells?

Did you try to set

advstringgrid1.GridDropDown.HeaderFont for example from the OnGetEditorProp event?