ShowFieldChooser() Method

Displays a FieldChooser that allows the user to select which fields are displayed in the data presenter.
Public Overloads Sub ShowFieldChooser() 
public void ShowFieldChooser()

ShowFieldChooser displays a FieldChooser that allows the user to select which fields are displayed in the data presenter. The FieldChooser control will be displayed using a Infragistics.Windows.Controls.ToolWindow.

You can control aspects of the FieldChooser by hooking into FieldChooserOpening event. The associated event args provides the instance of the FieldChooser that will be displayed as well as the ToolWindow that will be used to display it.

The following code calls an overload of ShowFieldChooser that displays the field chooser dialog for a specific field layout.

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

    Private Sub OnButtonClick(ByVal sender As Object, ByVal e As RoutedEventArgs)
        Dim customersFieldLayout As FieldLayout = _dataPresenter.FieldLayouts("Customers")

        Me._dataPresenter.ShowFieldChooser(customersFieldLayout, False, True, "Select Customer Fields to Display")
    End Sub
using Infragistics.Windows;
using Infragistics.Windows.Controls;
using Infragistics.Windows.Editors;
using Infragistics.Windows.DataPresenter;
using Infragistics.Windows.DataPresenter.Events;

		private void OnButtonClick( object sender, RoutedEventArgs e )
			FieldLayout customersFieldLayout = _dataPresenter.FieldLayouts["Customers"];

			this._dataPresenter.ShowFieldChooser( customersFieldLayout, false, true, "Select Customer Fields to Display" );

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also