ApplyAdvancedFilter Methode
Diese Methode wird immer dann aufgerufen, wenn ein erweiterter Filter (übersetzt durch die
TranslateFilterSyntax Methode) auf die Datenquelle angewendet werden soll.
This sample demonstrates how the ApplyAdvancedFilter method is implemented for the AdoDataProvider class. The filter is directly set as RowFilter, combined with any existing filter that might have been set before.
public void ApplyAdvancedFilter(string filter, object[] parameters)
{
DataViewSetting setting = _dataView.DataViewManager.DataViewSettings[_dataView.Table.TableName];
string rowFilter = setting.RowFilter;
string effectiveFilter = filter;
if (!String.IsNullOrEmpty(rowFilter))
{
effectiveFilter = String.Format("({0}) AND ({1})", rowFilter, filter);
}
_dataView.RowFilter = effectiveFilter;
}
Plattformen: Windows 10 (Version 21H2 - 22H2), Windows 11 (21H2 - 23H2), Windows Server 2016 - 2022
.NET: .NET Framework 4.8, .NET 6, .NET 8, .NET 9