Controlling the filtering from code

Top  Previous  Next

Even if automatic filtering is enough for many cases, you have the possibility of managing it manually. For this, the following methods and properties are used.

 

The "AutoFill" property controls the filling of controls with data. It is used by controls, which can show a list of values, for example, the ListBoxControl. Before showing a dialogue, FastReport fills such controls with data. By default, the property is set to true. If it is disabled, the control will not be filled, and you must do it yourself, by calling the "FillData" method:

 

ListBox1.FillData();

 

The "AutoFilter" property controls the data filtering. It is used by all controls. After the dialogue has been closed by the "ОК" button, FastReport applies data filter automatically. By default, the property is set to true. If it is disabled, the filtering will not happen, and you must do it yourself, by calling the "FilterData" method:

 

ListBox1.FilterData();