The current problem I'm facing is that the filters are not compliant as MS-FileDialog does, let me make it clear, when the DEV set the filter, for example, "JGRAM|*.jgram", if I try to select another file, with another extension, the dialog does not filter the files, when typing and pressing ENTER, see:
Please refer to the attached two gif file illustrating the default behavior of the MS OpenFileDialog and the RadOpenFileDialog.
1. Add a RadPopupEditor on the form and put two RadButtons in its container.
2. Add a RadOpenFileDialog and a MS OpenFileDialog.
3. Use the following code snippet:
public RadForm1()
{
InitializeComponent();
}
private void radButton1_Click(object sender, EventArgs e)
{
this.radOpenFileDialog1.InitialDirectory = @"C:\";
this.radOpenFileDialog1.FileName = string.Empty;
if (this.radOpenFileDialog1.ShowDialog() == DialogResult.OK)
{
string fileName = this.radOpenFileDialog1.FileName;
if (this.radOpenFileDialog1.SafeFileNames.ToList().Count() > 0)
{
fileName = this.radOpenFileDialog1.SafeFileNames.First();
}
this.Text = fileName;
}
}
private void radButton2_Click(object sender, EventArgs e)
{
this.openFileDialog1.InitialDirectory = @"C:\";
this.openFileDialog1.FileName = string.Empty;
if (this.openFileDialog1.ShowDialog() == DialogResult.OK)
{
string fileName = this.radOpenFileDialog1.FileName;
if (this.openFileDialog1.SafeFileNames.ToList().Count() > 0)
{
fileName = this.openFileDialog1.SafeFileNames.First();
}
this.Text = fileName;
}
}
Expected: MS OpenFileDialog is top most:
Actual: RadOpenFileDialog is beneath the popup container:
Workaround:
this.radOpenFileDialog1.OpenFileDialogForm.TopMost = true;
The problem is reproducible with the Demo application >> File Dialogs >> First Look example:
When opening the Folder Dialog (all in default, no changes needed) and then we click between "My PC" and "C:" back and forth quite rapidly, eventually the dialog freezes and after a while throws an unhandled exception. It is important to click between both quite fast for the issue to show.
Two different types of errors may occur:
Use the Demo application >> File Dialogs >> First Look example. I have tested typing "\\DYORDANOLAP" and hitting Enter and it seems to navigate to the folder only after pressing Enter a second time:
Expected: In the Windows File Explorer, the user is navigated to the respective folder after the first time the user hits Enter.
Currently, the dialogs provide a way to restore the last open directory. The opened directory path will be stored in a private string field of the RadOpenFolderDialog instance. However, in other this to work, the dialogs require the following steps:
We could expose a mechanism to cache the last open directory outside of the dialogs, thus allowing you to restore the directory even when the application is closed.