Completed
Last Updated: 15 Aug 2019 14:26 by ADMIN
Release R3 2019 (LIB 2019.2.819)
Jeff
Created on: 17 Jul 2019 15:43
Category: FileDialogs
Type: Bug Report
1
FilterIndex not working

Maybe I'm doing this wrong but it works with the standard .Net SaveFileDialog. No matter how many filters I add or which FilterIndex I set, the last filter is always activated.

With DF.RadSaveFileDialog1
    .SaveFileDialogForm.StartPosition = FormStartPosition.CenterParent
    .SaveFileDialogForm.Text = "Save File As - " & DF.OriginalTitle
    .SaveFileDialogForm.ThemeName = "Fluent"
    .CustomPlaces.Clear()
    .ShowNetworkLocations = False
    .InitialDirectory = My.Application.Info.DirectoryPath()
    .Filter = "Word Document (*.docx)|*.docx|PDF Document (*.pdf)|*.pdf"
    .RestoreDirectory = True
    .FilterIndex = 1
    .ShowDialog()
End With
1 comment
ADMIN
Dess | Tech Support Engineer, Principal
Posted on: 18 Jul 2019 08:42
Hello, Jeff,  

Indeed, the FilterIndex is not respected. I have logged it in our feedback portal by making this thread public. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item

I have also updated your Telerik points.

Currently, the possible solution that I can suggest is to manipulate the selected index in the filter drop down when the SaveFileDialogForm is shown:

Sub New()
 
    InitializeComponent()
 
    Me.RadSaveFileDialog1.Filter = "Word Document (*.docx)|*.docx|PDF Document (*.pdf)|*.pdf"
    AddHandler Me.RadSaveFileDialog1.SaveFileDialogForm.Shown, AddressOf SaveFileDialogForm_Shown     
    Me.RadSaveFileDialog1.ShowDialog()
     
End Sub
 
Private Sub SaveFileDialogForm_Shown(sender As Object, e As EventArgs)
    Dim dropDown As RadDropDownList = TryCast(Me.RadSaveFileDialog1.SaveFileDialogForm.Controls("doubleBufferedTableLayoutPanel1").Controls("filterDropDownList"), RadDropDownList)
    dropDown.SelectedIndex = 0
End Sub

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.