I am currently using the AdvFilterDialog and a DBAdvGrid with great success. I am wondering if there is a way to have this filter dialog come up with default values in the filter type and fieldname fields. My users use this filter dialogue with a Starts With and particular field 95% of the time and it would make for a nicer UI experience if those fields could be optionally defaulted when the dialog opens. Alternatively. Can this be accomplished if I just make my own form and use a TAdvFilterPanel?
We have checked this and it looks like what you want to do is access the controls on the FilterDialog to preset values.
Unfortunately, the AdvGridFilterDIalog.OnShow event as it is now, is triggered before the controls are created. We will change this order and trigger OnShow after controls are available and you could access for example the filter type combobox with:
TComboBox(TCustomControl(AdvGridFilterDialog1.Form.FilterPanel.CustomControl.Controls[0]).Controls[5]).ItemIndex := 5;
and the text value via
TEdit(TCustomControl(AdvGridFilterDialog1.Form.FilterPanel.CustomControl.Controls[0]).Controls[6]).Text := 'start';
from OnShow
So, in the next TMS VCL UI Pack update, the OnShow event should be triggered at the right moment to implement it this way.
Thank you so much. I will watch for the update!