Hallo,
to highlight which columns are editable we've decided to use the option "DropDownAlwaysVisible". This works great, so that you can easily distinguish between editable and non editable columns.
We also have checked the "RangeSelectAndEdit"-Option to edit more than one cell at once. This also works fine for cells of "edittype" "edEdit". The only issue we now face is, that the "range select and edit" does not work for combobox-cells (edCombolist).
If you try to select multiple cells of this type, the combobox drops down directly, so it is not possible to select more than one cell. It seems, that there is no difference between a "select"-click and a "do the edit"-click, which is like a milisecond longer, for those cells as it is for cells with an edit-field.
Is there anything we can do about it? Like an extra corresponding eventlistener or another option we are missing?
Thanks in advance.
P.s.: we use Delphi 11 + TMS VCL UI Package V10.7.5.0
We have applied an improvement so that when RangeSelectAndEdit = true, the combobox will not react to dropdown when it is clicked outside the dropdown button area. This way, a range selection remains possible when click & drag from the area outside the dropdown button area.
This improvement will be included in the next update.
We've installed the new Version 1.8.0.0. of the VCL UI Pack. Sadly I still can't get it to work, even in a demoproject.
procedure TForm16.AdvStringGrid1EditCellDone(Sender: TObject; ACol, ARow: Integer);
begin
AdvStringGrid1.BeginUpdate;
var Cell := AdvStringGrid1.AllCells[ACol, ARow];
for var i := 0 to AdvStringGrid1.SelectedRowCount - 1 do
begin
AdvStringGrid1.Cells[ACol, AdvStringGrid1.SelectedRow[i]] := AdvStringGrid1.Cells[ACol, ARow];
end;
AdvStringGrid1.EndUpdate;
end;
procedure TForm16.FormCreate(Sender: TObject);
begin
for var i := 0 to AdvStringGrid1.ColCount - 1 do
begin
AdvStringGrid1.Cols[i].BeginUpdate;
try
// Add row data
for var j := 1 to AdvStringGrid1.RowCount - 1 do
AdvStringGrid1.Cols[i][j] := i.ToString + j.ToString;
finally
AdvStringGrid1.Cols[i].EndUpdate;
end;
end;
end;
procedure TForm16.AdvStringGrid1GetEditorProp(Sender: TObject; ACol, ARow: Integer; AEditLink: TEditLink);
begin
if ACol = 1 then
begin
AdvStringGrid1.ClearComboString;
AdvStringGrid1.Combobox.Items.Add('test1');
AdvStringGrid1.Combobox.Items.Add('test2');
end;
end;
procedure TForm16.AdvStringGrid1GetEditorType(Sender: TObject; ACol, ARow: Integer; var AEditor: TEditorType);
begin
if ACol = 1 then
AEditor := TEditorType.edComboList
else
AEditor := TEditorType.edEditBtn
end;
I have set:
ControlLook.DropDownAlwaysVisible = True
MouseActions.RangeSelectAndEdit = True
For all columns besides the first one, the range select and edit works well. With the combobox it still has the same issue. If I click on it (and not the dropdown-button directly) it opens the dropdown so I can't select more than one cell... even with the arrow-keys.. it opens the dropdown directly..
Version of the AdvStringGrid is "Version = '8.6.14.7'", which is the correct one (July 2022).
Could you provide a minimal example, which works for you? Thanks!