Completed
Last Updated: 23 Sep 2022 13:07 by ADMIN
Release R3 2022
Patrick
Created on: 02 Mar 2022 11:05
Category: FileDialogs
Type: Bug Report
1
RadOpenFileDialog: Dialog is not shown as topmost window when called from a RadPopupContainer

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;

 

0 comments