Exception raised in grid view when moving mouse with multi select

3 Answers 95 Views
General Discussions GridView
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Toby asked on 21 Jul 2022, 07:51 AM

Hi, 

In my application (latest Telerik WinForms and .NET 4.7.2) I have a grid view control which is fixed in size, scroll bars always hidden, multi select is enabled. If I press and hold the left mouse button then drag the mouse downbelow the control it scrolls (not sure why) and then throws an exception.

I have managed to reproduce the issue with a simple test application (attached) 

Kind regards
Toby

3 Answers, 1 is accepted

Sort by
1
Accepted
Dinko | Tech Support Engineer
Telerik team
answered on 21 Jul 2022, 08:53 AM

Hello Toby,

Thank you for the provided project.

I have examined it and it comes from the AutoSize property. When this property is set the control will select its size depending on its rows. Now in this case, when multiselection is enabled and you try to select all rows by clicking on the first one and moving the mouse down, the internal logic of the row behavior will try to change the vertical/horizontal scrollbar value. In this scenario, this is not required and we need to handle it on our side. Therefore I have logged it in our Feedback Portal on your behalf where you can track its progress. You could subscribe to the feedback item so that you could get notified of its status change.

What I can suggest as a workaround is to set the MaximumSize property of the control to some big value.

this.radGridView1.MaximumSize = new Size(1000,1000);

Your Telerik Points are updated for bringing this behavior to our attention.

Regards,
Dinko
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Toby
Top achievements
Rank 3
Iron
Iron
Iron
commented on 21 Jul 2022, 09:06 AM

Thanks for the fast response as always, this has solved the issue.

After I populate my fixed sized grid with columns and rows this is what I have done which works as you suggest

grid.Width = 100;
grid.Height = 100;
grid.AutoSize = true;
grid.MinimumSize = grid.MaximumSize = grid.Size;

I find that setting width and height first forces autosize to immediately recalculate the size of the size grid so that grid.Size can be used immeditaely in the same method call ratrher than waiting for it to be rendered.

Thanks

0
Toby
Top achievements
Rank 3
Iron
Iron
Iron
answered on 28 Jul 2022, 10:54 AM
Hi Dinko, I have just noticed thay I didn't receive any Telerik points for bringing this to your attention, can you look into this for me please ?
0
Dinko | Tech Support Engineer
Telerik team
answered on 28 Jul 2022, 01:00 PM

Hello Toby,

I have checked that and you are right. The points failed to update. I will update them shortly.

Regards,
Dinko
Progress Telerik

The Premier Dev Conference is back! 

Coming to you live from Progress360 in-person or on your own time, DevReach for all. Register Today.


Tags
General Discussions GridView
Asked by
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Answers by
Dinko | Tech Support Engineer
Telerik team
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Share this question
or