Unplanned
Last Updated: 19 Aug 2019 08:36 by Robert
Robert
Created on: 09 Aug 2019 07:52
Category: FileDialogs
Type: Feature Request
2
FileDialogs: OpenFileDialog does not update FilterIndex and InitialSelectedLayout
RadOpenFileDialog does not update FilterIndex

The RadOpenFileDialog has a property FilterIndex to get or set the index of the currently selected filter. Setting the index works fine. However, the property is not updated when the user selects a different filter. FilterIndex will always keep the value that was initially set. This is quite annoying, as we want that our customers find their most recently used filter index pre-selected.

The same problem exists for InitialSelectedLayout, which is never update either. .Net Framework's OpenFileDialog restores the most recently selected view automatically.

FileDialogs version is 2019.1.116.45
2 comments
Robert
Posted on: 19 Aug 2019 08:36

Hello Dilyan,

Thanks for your answer. I think we can live with that approach for now.

Best regards,
Markus (representative for Robert)

ADMIN
Dilyan Traykov
Posted on: 15 Aug 2019 10:25
Hello Robert,

Thank you for your feedback.

What you can do in this scenario, while we implement this feature, is to use reflection to get the FilterIndex property of the underlying viewmodel which is actually changed when your users select new filter from the combo box. A similar approach can be used for the InitialSelectedLayout property. You can use the Closed event of the RadOpenFileDialog to persist these:

private void OpenFialog_Closed(object sender, WindowClosedEventArgs e)
{
    var viewModel = this.openDialog.DataContext;
    this.openDialog.FilterIndex = (int)viewModel.GetType().GetProperty("FilterIndex").GetValue(viewModel) + 1;
    var layout = (LayoutConfigurationModel)viewModel.GetType().GetProperty("SelectedLayout").GetValue(viewModel);
    this.openDialog.InitialSelectedLayout = (LayoutType)layout.LayoutType;
}

Please let me know whether such an approach would work for you for the time being.

Regards,
Dilyan Traykov
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.