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
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.
That's exactly the info I needed to make it configurable, in case the user does not like it.
Regards
Erwin
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
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.
Dimitar
Telerik
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
Hi Dimitar,
Any update on this?
Thanks,
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
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
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