This is a migrated thread and some comments may be shown as answers.

ColumnChooser now topmost in 2011Q3

9 Answers 119 Views
GridView
This is a migrated thread and some comments may be shown as answers.
erwin
Top achievements
Rank 1
Veteran
Iron
erwin asked on 12 Dec 2011, 06:03 PM
Hi,
I find it rather annoying that the column chooser is now a topmost window.
The column chooser should be in front of all application windows from the app that called it but not on top of any other application.
What do other users think?

Regards
Erwin

9 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 15 Dec 2011, 02:08 PM
Hi Erwin,

Thank you for writing.

Currently, this is the default state of this window and it was not changed in the last year and a half. We are not planning on changing it, unless a considerable number of users request the same. If you do not like this behavior in your project, you can change it by setting the TopMost property of the ColumnChooser to false:
radGridView1.GridViewElement.ColumnChooser.TopMost = false;

I hope that you find this information helpful. Should you have any other questions or suggestions, do not hesitate to contact us.
 
Regards,
Stefan
the Telerik team

Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.

0
erwin
Top achievements
Rank 1
Veteran
Iron
answered on 15 Dec 2011, 04:07 PM
Thanks Stefan,

That's exactly the info I needed to make it configurable, in case the user does not like it.

Regards
Erwin
0
Sandeep
Top achievements
Rank 1
answered on 19 May 2016, 09:59 AM

Hi,

I tried setting up the ColumnChooser.TopMost = false; and it works the first time. The ColumnChooser does not remain on top.

If I close and reopen the ColumnChooser for same grid, the ColumnChooser remains on top. 

I tried setting the ColumnChooser.TopMost = false in ColumnChooser_Shown event handler but still the TopMost works only once. All subsequent attempts to open ColumnChooser for same grid has TopMost set to true by default.

private void ColumnChooser_Shown(object sender, EventArgs e)
        {
        this.radGridView1.GridViewElement.ColumnChooser.TopMost = false;
        }

 

Anything can be done for this issue for?

 

Regards,

Sandeep

0
Dimitar
Telerik team
answered on 20 May 2016, 11:54 AM
Hi Sandeep,

Thank you for writing.

You need to set the Owner to null as well. For example:
private void RadGridView1_ColumnChooserCreated(object sender, ColumnChooserCreatedEventArgs e)
{
    e.ColumnChooser.Shown += ColumnChooser_Shown;
}
 
private void ColumnChooser_Shown(object sender, EventArgs e)
{
    var chooser = (GridViewColumnChooser)sender;
    chooser.TopMost = false;
    chooser.Owner = null;
}

Please let me know if there is something else I can help you with. 
 
Regards,
Dimitar
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Sandeep
Top achievements
Rank 1
answered on 07 Jun 2016, 07:57 AM

Hi,

I could set the Owner to null and its working. When I open the column chooser, for the first time if I click somewhere else outside column chooser window, it gets hide. If I reopen it thru right click on grid it remains visible. Can something be done to make it visible first time as well after opening, when the focus is lost of mouse clicked outside of  column chooser?

Regards,

Sandeep

0
Sandeep
Top achievements
Rank 1
answered on 08 Jun 2016, 01:05 PM

Hi Dimitar,

Any update on this?

Thanks,

Sandeep

 

0
Dimitar
Telerik team
answered on 09 Jun 2016, 08:29 AM
Hi Sandeep,

Thank you for writing back.

If I understand correctly you want the main window to be in front of the column chooser when it is started. To achieve this you can use the BringToFront method:
private void ColumnChooser_Shown(object sender, EventArgs e)
{
    var chooser = (GridViewColumnChooser)sender;
    chooser.TopMost = false;
    chooser.Owner = null;
    this.BringToFront();
}

I hope this helps. Should you have any other questions do not hesitate to ask.

Regards,
Dimitar
Telerik
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
0
Sandeep
Top achievements
Rank 1
answered on 09 Jun 2016, 12:23 PM

Hi,

Thanks for your reply. Its not the main window, I want column chooser to remain visible and that's not happening the first time it is opened and looses focus.

Second time onwards on opening the chooser, it remains visible, even after lost focus.

I tried setting chooser.BringToFront() but its not helping either.

We have a main application window which captures whole screen, then we open a winforms dialog containing grid, this is modal dialog. Through this dialog's grid view, we open column chooser. Now if I click anywhere outside column chooser it gets invisible. If I open column chooser again, it remains visible even if I click anywhere outside column chooser.

Can we avoid hiding of the chooser the first time as well?

Regards,

Sandeep

0
Dimitar
Telerik team
answered on 10 Jun 2016, 11:13 AM
Hi Sandeep,

If I understand correctly you want the ColumnChooser to be in the middle (bellow the grid form and in front of the main form). This cannot be done if the form is shown as dialog. What you can do is to leave the ColumnChooser as TopMost, or do not show the form as a modal dialog. If you show it as a regular form the column chooser will not go in the back.

Should you have other questions, I would be glad to help.

Regards,
Dimitar
Telerik
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
Tags
GridView
Asked by
erwin
Top achievements
Rank 1
Veteran
Iron
Answers by
Stefan
Telerik team
erwin
Top achievements
Rank 1
Veteran
Iron
Sandeep
Top achievements
Rank 1
Dimitar
Telerik team
Share this question
or