バージョン

FilterClearButtonLocation プロパティ

フィルター クリア ボタンを表示するかどうかを指定して、その表示位置を指定します。デフォルトは RecordSelectorAndFilterCell に解決されます。
シンタックス
'宣言
 
Public Property FilterClearButtonLocation As FilterClearButtonLocation
public FilterClearButtonLocation FilterClearButtonLocation {get; set;}
解説

FilterClearButtonLocation プロパティは、フィルター クリア ボタンの表示のおよび位置を指定します。デフォルトでは、フィルター クリア ボタンはフィルター レコードのレコード セレクターおよび各フィルター セルに表示されます。それによって、ユーザーはフィルター条件をクリアすることが可能です。

FieldSettings の FieldSettings.FilterClearButtonVisibility プロパティを使用して、フィールド単位でフィルター クリア ボタンの可視性を制御できます。

フィルターのクリアなど、フィルターを操作するには、RecordFilterCollection を使用します。

使用例
The following code snippet sets FilterClearButtonLocation to RecordSelectorAndFilterCell and FilterClearButtonVisibility of 'Country' field to Collapsed. This will result in all fields displaying filter clear button in their filter cells except the 'Country' field.

Imports Infragistics.Windows
Imports Infragistics.Windows.Controls
Imports Infragistics.Windows.Editors
Imports Infragistics.Windows.DataPresenter
Imports Infragistics.Windows.DataPresenter.Events

    Private Sub Window1_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
        
        ' Enable the record filtering functionality.
        _dp.FieldSettings.AllowRecordFiltering = True

        ' You can use FilterClearButtonLocation to specify whether to display filter clear
        ' button in record selector and/or cells. Note that the filter clear button is 
        ' displayed only if there are active filters. Therefore you must select some filter
        ' criteria in the filter cell to display the filter clear button.
        _dp.FieldLayoutSettings.FilterClearButtonLocation = FilterClearButtonLocation.RecordSelectorAndFilterCell

        ' You can use the FieldSettings' FilterClearButtonVisibility to override filter 
        ' clear button visibility on a specific field, in this case the 'Country' field.
        _dp.FieldLayouts(0).Fields("Country").Settings.FilterClearButtonVisibility = Visibility.Collapsed

    End Sub
using Infragistics.Windows;
using Infragistics.Windows.Controls;
using Infragistics.Windows.Editors;
using Infragistics.Windows.DataPresenter;
using Infragistics.Windows.DataPresenter.Events;

		public void Window1_Loaded( object sender, RoutedEventArgs e )
		{
			// Enable the record filtering functionality.
			_dp.FieldSettings.AllowRecordFiltering = true;

			// You can use FilterClearButtonLocation to specify whether to display filter clear
			// button in record selector and/or cells. Note that the filter clear button is 
			// displayed only if there are active filters. Therefore you must select some filter
			// criteria in the filter cell to display the filter clear button.
			_dp.FieldLayoutSettings.FilterClearButtonLocation = FilterClearButtonLocation.RecordSelectorAndFilterCell;

			// You can use the FieldSettings' FilterClearButtonVisibility to override filter 
			// clear button visibility on a specific field, in this case the 'Country' field.
			_dp.FieldLayouts[0].Fields["Country"].Settings.FilterClearButtonVisibility = Visibility.Collapsed;
		}
        <igDP:XamDataGrid x:Name="_dp" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >

            
<igDP:XamDataGrid.FieldSettings>
                
<!--Enable the record filtering functionality.-->
                
<igDP:FieldSettings
                    
AllowRecordFiltering="true"
                
/>
            
</igDP:XamDataGrid.FieldSettings>
            
            
<igDP:XamDataGrid.FieldLayoutSettings>
                
<!-- You can use FilterClearButtonLocation to specify whether to display filter clear
         button in record selector and/or cells. Note that the filter clear button is 
         displayed only if there are active filters. Therefore you must select some filter
         criteria in the filter cell to display the filter clear button.
-->
                
<igDP:FieldLayoutSettings
                    
FilterClearButtonLocation="RecordSelectorAndFilterCell"
                
/>
            
</igDP:XamDataGrid.FieldLayoutSettings>
            
            
<igDP:XamDataGrid.FieldLayouts>
                
                
<igDP:FieldLayout>
                    
<igDP:FieldLayout.Fields>
                        
<igDP:Field Name="ID" />

                        
<!-- You can use the FieldSettings' FilterClearButtonVisibility to override filter 
                             clear button visibility on a specific field, in this case the 'Country' field.
-->
                        
<igDP:Field Name="Country" >
                            
<igDP:Field.Settings>
                                
<igDP:FieldSettings FilterClearButtonVisibility="Collapsed" />
                            
</igDP:Field.Settings>
                        
</igDP:Field>
                        
                    
</igDP:FieldLayout.Fields>
                
</igDP:FieldLayout>
                
            
</igDP:XamDataGrid.FieldLayouts>
            
        
</igDP:XamDataGrid>
参照