'Declaration Public Overloads Sub ShowFieldChooser( _ ByVal fieldLayout As FieldLayout, _ ByVal allowFieldLayoutSelection As Boolean _ )
public void ShowFieldChooser( FieldLayout fieldLayout, bool allowFieldLayoutSelection )
ShowFieldChooser displays a FieldChooser that allows the user to select which fields of the specified field layout 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.
Note that if the fieldLayout parameter is specified, the fields of that field layout will be displayed in the FieldChooser. Otherwise the root field layout's fields will be displayed. The AllowFieldLayoutSelection parameter specifies whether the the user will be allowed to change the field layout and select fields of other field layouts. FieldChooser's FieldChooser.FieldGroupSelectorVisibility property will be initialized based on that parameter.
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