フィールドのフィルター ドロップダウンとカスタム フィルター選択のコントロールのフィルター ドロップダウンに別の項目を表示する必要がある場合は、それを使用します。
Imports Infragistics.Windows Imports Infragistics.Windows.Controls Imports Infragistics.Windows.Editors Imports Infragistics.Windows.DataPresenter Imports Infragistics.Windows.DataPresenter.Events Private Sub Dp_RecordFilterDropDownOpening(ByVal sender As Object, ByVal e As RecordFilterDropDownOpeningEventArgs) ' Field property returns the field for which the filter drop-down is opening. Dim field As Field = e.Field ' RecordManager property returns the record manager associated with the data ' records that are being filtered. This is especially pertinent with hierarchical ' data source where multiple child data record collections exist. This lets ' you know for which data record collection the filter drop-down is being dropped ' down. Dim recordManager As RecordManager = e.RecordManager ' RaisedForCustomFilterSelectionControl property indicates if the drop-down is ' being opened inside the custom filter dialog or within the data presenter itself. Dim isRaisedFromWithinCustomFilterDialog As Boolean = e.RaisedForCustomFilterSelectionControl ' DropDownItems property returns items that will be displayed in the drop-down. ' You can manipulate the list and add your own items to it or remove existing ' items from it. Dim dropDownItems As ObservableCollection(Of FilterDropDownItem) = e.DropDownItems Debug.WriteLine("Record filter drop-down is opening for field " & field.Name) End Sub
using Infragistics.Windows; using Infragistics.Windows.Controls; using Infragistics.Windows.Editors; using Infragistics.Windows.DataPresenter; using Infragistics.Windows.DataPresenter.Events; private void dp_RecordFilterDropDownOpening( object sender, RecordFilterDropDownOpeningEventArgs e ) { // Field property returns the field for which the filter drop-down is opening. Field field = e.Field; // RecordManager property returns the record manager associated with the data // records that are being filtered. This is especially pertinent with hierarchical // data source where multiple child data record collections exist. This lets // you know for which data record collection the filter drop-down is being dropped // down. RecordManager recordManager = e.RecordManager; // RaisedForCustomFilterSelectionControl property indicates if the drop-down is // being opened inside the custom filter dialog or within the data presenter itself. bool isRaisedFromWithinCustomFilterDialog = e.RaisedForCustomFilterSelectionControl; // DropDownItems property returns items that will be displayed in the drop-down. // You can manipulate the list and add your own items to it or remove existing // items from it. ObservableCollection<FilterDropDownItem> dropDownItems = e.DropDownItems; Debug.WriteLine( "Record filter drop-down is opening for field " + field.Name ); }