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.