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

RadGridView can't rectangle all cells after use Windows7Theme

9 Answers 71 Views
GridView
This is a migrated thread and some comments may be shown as answers.
tony
Top achievements
Rank 1
tony asked on 07 Aug 2015, 05:46 AM

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);
            }
        }

9 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 07 Aug 2015, 12:57 PM
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 . RadGridView no longer shows a selection rectangle. 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
0
tony
Top achievements
Rank 1
answered on 10 Aug 2015, 03:06 AM

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".

 

 

 

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 10 Aug 2015, 02:15 PM
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
0
tony
Top achievements
Rank 1
answered on 11 Aug 2015, 08:08 AM

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?

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 11 Aug 2015, 08:59 AM
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 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
0
tony
Top achievements
Rank 1
answered on 11 Aug 2015, 09:24 AM
Please review my view. Thanks.
0
tony
Top achievements
Rank 1
answered on 11 Aug 2015, 09:47 AM
Sorry, forget picture.
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 11 Aug 2015, 11:20 AM
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 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
0
tony
Top achievements
Rank 1
answered on 12 Aug 2015, 03:53 AM

Thank you very much  :)

I resolve it.

Tags
GridView
Asked by
tony
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
tony
Top achievements
Rank 1
Share this question
or