RadGridView can't rectangle all cells after use Windows7Theme

10 posts, 0 answers
  1. tony
    tony avatar
    12 posts
    Member since:
    Nov 2014

    Posted 07 Aug 2015 Link to this post

    Hi all, 

    RadGridView can't rectangle all cells as long as I use "Windows7Theme"

    The mouse will stop on middle cell when you drag you mouse.

    Please my code. Thanks.

     

        public partial class MyForm: Form
        {
            private Telerik.WinControls.Themes.Windows7Theme windows7Theme = new Telerik.WinControls.Themes.Windows7Theme (); 
            public MyForm ()
            {
                InitializeComponent ();
                Telerik.WinControls.ThemeResolutionService.ApplicationThemeName = "Windows7";

                this.radGridView1.Location = new System.Drawing.Point (0, 0);
                this.ClientSize = new System.Drawing.Size (600, 300);
                this.radGridView1.Size = new System.Drawing.Size (600, 300);
                this.radGridView1.MasterTemplate.MultiSelect = true;
                this.radGridView1.SelectionMode = GridViewSelectionMode.CellSelect;
                this.radGridView1.MasterTemplate.SelectionMode = Telerik.WinControls.UI.GridViewSelectionMode.CellSelect;
                this.radGridView1.MasterTemplate.ShowRowHeaderColumn = false;
                this.radGridView1.MasterGridViewTemplate.ShowRowHeaderColumn = false;
                DataTable dataSource = new DataTable ("Test");
                for (int i = 0; i < 40; i++)
                {
                    string ColName = string.Format ("Col{0}", i.ToString ());
                    dataSource.Columns.Add (ColName, typeof (string));
                }
                this.radGridView1.DataSource = dataSource;
                for (int i = 0; i < 40; i++)
                {
                    DataRow datarow = dataSource.NewRow ();
                    for (int j = 0; j < dataSource.Columns.Count; j++)
                    {
                        string sText = dataSource.Columns[j].ColumnName;
                        sText += i.ToString ();
                        datarow[j] = sText;
                    }
                    dataSource.Rows.Add (datarow);
                }
            }

  2. Dess
    Admin
    Dess avatar
    1601 posts

    Posted 07 Aug 2015 Link to this post

    Hello Tony,

    Thank you for writing.

    We have made a massive refactoring of the selection mechanism in RadGridView in order to address issues regarding multiple selection. RadGridView no longer shows a selection rectangle. Instead the selection is performed directly on rows/cells. Please refer to the attached gif file illustrating the behavior in the latest version. We will consider it in the future improvement of RadGridView.

    Should you have further questions I would be glad to help.
     
    Regards,
    Dess
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
  4. tony
    tony avatar
    12 posts
    Member since:
    Nov 2014

    Posted 09 Aug 2015 in reply to Dess Link to this post

    Thanks for your reply.

    My telerik version is 2014.1.402.20.

    I run your demo app, but the result is also like what i said above.

    Additionally, Could we find a work around to resolve "rectangle selection" with scroll bar at this moment? Thanks.

    I am afraid the user won't be accustomed with "no rectangle selection".

     

     

     

  5. Dess
    Admin
    Dess avatar
    1601 posts

    Posted 10 Aug 2015 Link to this post

    Hello Tony,

    Thank you for writing back.
     
    When I run the provided sample project with the specified version 2014.1.402 the translucent selection rectangle is displayed. However, if you scroll down while holding the left mouse button down in order to select as many cells as possible, these cells that are outside the current view get unselected. This is a known issue which was addressed in Q2 2015. Here is the feedback item for your reference. You can find a suggested workaround as well. I would recommend you to upgrade in order to benefit from the fix. Thus, you will be able to select multiple cells that are outside the current grid view by holding the left mouse button down. However, RadGridView no longer shows translucent selection rectangle. Instead, the selection is performed directly on rows/cells. We will consider the rectangle drawing in the future improvement of the grid selection behavior.

    If you have any additional questions, please let me know.

    Regards,
    Dess
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. tony
    tony avatar
    12 posts
    Member since:
    Nov 2014

    Posted 11 Aug 2015 in reply to Dess Link to this post

    Thanks your reply. 

    My find a issue.

    If set radGridView1.MasterTemplate.ShowRowHeaderColumn = false; selection will be failed.(stop in progress)

    If set radGridView1.MasterTemplate.ShowRowHeaderColumn = true; selection will be successful.

    Our project need to hide the row header :(

    Could you select all cell by mouse drag?

  7. Dess
    Admin
    Dess avatar
    1601 posts

    Posted 11 Aug 2015 Link to this post

    Hello Tony,

    Thank you for writing back.

    I can perform multiple selection in my sample project with mouse move while the left mouse button is pressed no matter what is the value of the ShowRowHeaderColumn property. Please refer to the attached gif file. Am I missing something? Could you please specify the exact steps how to reproduce the problem with the provided sample project from my first post? Feel free to modify it on a way to reproduce the experienced issue and get back to me with it so I can investigate the precise case. Once, we reproduce the issue locally, we can make adequate analysis of the problem and assist you further. Thank you in advance.

    As noted in my previous post, we have a known issue when selecting multiple cells with mouse drag and the vertical/horizontal scrollbar are moved. These cells that are outside the current view get unselected. There is suggested a workaround in the referred feedback item. This issue is addressed in the latest version.

    I am looking forward to your reply.

    Regards,
    Dess
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  8. tony
    tony avatar
    12 posts
    Member since:
    Nov 2014

    Posted 11 Aug 2015 in reply to Dess Link to this post

    Please review my view. Thanks.
  9. tony
    tony avatar
    12 posts
    Member since:
    Nov 2014

    Posted 11 Aug 2015 in reply to tony Link to this post

    Sorry, forget picture.
  10. Dess
    Admin
    Dess avatar
    1601 posts

    Posted 11 Aug 2015 Link to this post

    Hello Tony,

    Thank you for writing back.

    I have reviewed once again the provided screenshot from your initial post and succeeded in reproducing the problem you are facing with the specified version 2014.1.402 and Windows7 theme. Indeed, when the ShowRowHeaderColumn property is set to false, the multiple selection while scrolling will stop at a certain point. However, this undesired behavior is not reproducible in the latest version. I would recommend you to upgrade. Otherwise, you can subscribe to the ViewRowFormatting event and set the RowElement.Shape  property to null which actually breaks the selection in this version:
    private void radGridView1_ViewRowFormatting(object sender, RowFormattingEventArgs e)
    {
        e.RowElement.Shape = null;
    }

    I hope this information helps. If you have any additional questions, please let me know.

    Regards,
    Dess
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  11. tony
    tony avatar
    12 posts
    Member since:
    Nov 2014

    Posted 11 Aug 2015 in reply to Dess Link to this post

    Thank you very much  :)

    I resolve it.

Back to Top
UI for WinForms is Visual Studio 2017 Ready