Back to Devexpress

FileDialogBase.FilterIndex Property

windowsforms-devexpress-dot-xtraeditors-dot-filedialogbase-2be8e24f.md

latest3.0 KB
Original Source

FileDialogBase.FilterIndex Property

Gets or sets the index of the filter currently selected in the file dialog box. This property is identical to the standard FileDialog.FilterIndex property.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraDialogs.v25.2.dll

NuGet Packages : DevExpress.Win.Dialogs, DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(1)]
[DXCategory("Behavior")]
public int FilterIndex { get; set; }
vb
<DefaultValue(1)>
<DXCategory("Behavior")>
Public Property FilterIndex As Integer

Property Value

TypeDefaultDescription
Int321

The index of the selected filter.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the FilterIndex property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-richedit-control-mail-merge/CS/MailMerge/Form1.cs#L46

csharp
fileDialog.Filter = "MS Word 2007 documents (*.docx)|*.docx|All files (*.*)|*.*";
fileDialog.FilterIndex = 1;
fileDialog.RestoreDirectory = true;

winforms-richedit-save-a-document/CS/SaveDocument/CustomCommand.cs#L51

csharp
dialog.AddExtension = false;
dialog.FilterIndex = 1;
dialog.InitialDirectory = "C:\\Temp";

winforms-richedit-control-mail-merge/VB/MailMerge/Form1.vb#L42

vb
fileDialog.Filter = "MS Word 2007 documents (*.docx)|*.docx|All files (*.*)|*.*"
fileDialog.FilterIndex = 1
fileDialog.RestoreDirectory = True

See Also

FileDialogBase Class

FileDialogBase Members

DevExpress.XtraEditors Namespace