DropDown controls

Hi to all,

with the goRowselect:=True and goEditng:=True there is the possibility, when i press the mouse button on a column, to show the built in datepiker?

I tried via CanClickCell where change the gorowselect to false, but in order to show the calendar i have to press the mouse button again on the cell (and in this time the grid is in the edit mode ..... thing to avoid !).

How can i show the calendar (edDateEdit) with gorowSelect setted as true, or, how can i do to show in one mouse button press this control ??

Now i press the mouse button on the cell, i set goRowSelect:=False, call GetEditorType but the control does not show.

Thank's in advance for the reply.

Have a nice day


Normally, starting an inplace editor is done on the cell that is selected, but when you have goRowSelect = true, there is an entire row selected and that means there isn't a specific cell for which inplace editing can be started.

Setting goRowSelect = false from the mouse down event is too late for this.
Not sure what you want to achieve by keeping goRowSelect = true but if it is just coloring the active row, you can do this with grid.ActiveRowShow = true as well.

Hi Bruno,

   i setted goRowselect = True and goEditing = False because the data in the grid is "read only", the only column that is non readonly is tha date column where i can change the date.

I tryed with goRowSelect = False and ActiveRowShow = true but the problem still persist because i need to keep goEditing = False in order to avoid that the user can change, also, the other data.

A way to skip this (but is workaround) is check the row and column via CanClickCell event and, over the date cell, open a new form where i can get a new date with PlannerDatePicker.

Thank's for your attention.

Have a good day


To control which columns are readonly and which not, you can use the event:

OnCanEditCell (and have goEditing = true in grid.Options)

procedure TForm1.AdvStringGrid1CanEditCell(Sender: TObject; ARow, ACol: Integer;
  var CanEdit: Boolean);
  CanEdit := (ACol in [2]);