ColumnChooser now topmost in 2011Q3

10 posts, 1 answers
  1. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 12 Dec 2011 Link to this post

    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
  2. Answer
    Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 15 Dec 2011 Link to this post

    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.

  3. UI for WinForms is Visual Studio 2017 Ready
  4. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 15 Dec 2011 Link to this post

    Thanks Stefan,

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

    Regards
    Erwin
  5. Sandeep
    Sandeep avatar
    7 posts
    Member since:
    Aug 2013

    Posted 19 May Link to this post

    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

  6. Dimitar
    Admin
    Dimitar avatar
    1411 posts

    Posted 20 May Link to this post

    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.
  7. Sandeep
    Sandeep avatar
    7 posts
    Member since:
    Aug 2013

    Posted 07 Jun in reply to Dimitar Link to this post

    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

  8. Sandeep
    Sandeep avatar
    7 posts
    Member since:
    Aug 2013

    Posted 08 Jun Link to this post

    Hi Dimitar,

    Any update on this?

    Thanks,

    Sandeep

     

  9. Dimitar
    Admin
    Dimitar avatar
    1411 posts

    Posted 09 Jun Link to this post

    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.
  10. Sandeep
    Sandeep avatar
    7 posts
    Member since:
    Aug 2013

    Posted 09 Jun in reply to Dimitar Link to this post

    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

  11. Dimitar
    Admin
    Dimitar avatar
    1411 posts

    Posted 10 Jun Link to this post

    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.
Back to Top
UI for WinForms is Visual Studio 2017 Ready