AdvGridDropDown SearchFooter reset

Hi,

I've got a problem using SearchFooter properties in the edAdvGridDropDown editor, which is a pretty good functionnality.

I have multiple editor in the same grid. But when the end-user use the search footer by typing "test" for example, when it will open another edAdvGridDropDown in another column (with different data) or in the same column, the "test" value is always keep in the editor of the search footer.

I would like to remove this value at each display of the grid (in the OnGetEditorProp event, it is the way used to fill the AdvStringGrid1.AdvGridDropDown).

I haven't found methods or properties to modify this.
I used AdvStringGrid1.AdvGridDropDown.Clear; but there is no effect.
I try with AdvStringGrid1.AdvGridDropDown.SearchFooter.LastSearch := ''; but it doesn't work.

Do you have any idea how to reset completly the grid between each OnGetEditorProp event ? Maybe this is not the good event to use ?

Thanks

Try from the OnGetEditorProp event:


grid.GridDropDown.FGrid.SearchPanel.EditControl.Clear
Thanks for the solution, but it doesn't work.
If tried grid.GridDropDown.FGrid.SearchPanel.EditControl.Clear or grid.AdvGridDropDown.FGrid.SearchPanel.EditControl.Clear
But, in the 2 cases, I have this message when I try to popup the grid in execution mode : "Control '' has no parent Window".

Do you have any idea for this message ?

Do you call this from the grid.OnGetEditorProp event?

Yes, this is call from the Grid.OnGetEditorProp event.

Hi,
I have no message error when I use this :
TRetEdit(PAdvStringGrid.AdvGridDropDown.FGrid.SearchPanel.EditControl).Text := '';

But there is no effect on my text in the SeachFooter edit. I try to replace SearchPanel by SearchFooter, but there is no EditControl properties in this case.

Use this code applied to a default TAdvStringGrid


procedure TForm1.FormCreate(Sender: TObject);
begin
  AdvStringGrid1.Options := AdvStringGrid1.Options + [goEditing];
  AdvStringGrid1.DefaultEditor := edAdvGridDropDown;
  AdvStringGrid1.AdvGridDropDown.OnDropDown := GridDropDown;
  AdvStringGrid1.AdvGridDropDown.SearchFooter.Visible := true;
end;

procedure TForm1.GridDropDown(Sender: TObject;  var acceptdrop: boolean);
begin
  AdvStringGrid1.AdvGridDropDown.Grid.SearchPanel.EditControl.Text := '';
end;
Thank you Bruno.
This solution is working fine.
Have a nice day.