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

RadGrid vertical and horizontal scroll bar width

5 Answers 352 Views
GridView
This is a migrated thread and some comments may be shown as answers.
CJ
Top achievements
Rank 1
CJ asked on 18 May 2011, 01:25 PM
Hi,

I am using RadGridview for an application that runs on touch screen monitor. It becomes very difficult for the users to scroll using the standard sized scroll bars that come up in radgrid. Can someone please advice on how to increase the scroll bar width.

thanks
J Sagayanathan

5 Answers, 1 is accepted

Sort by
0
Accepted
Emanuel Varga
Top achievements
Rank 1
answered on 20 May 2011, 09:05 AM
Hello,

For the vertical scrollbar you can use the following:
radGridView1.GridViewElement.TableElement.VScrollBar.MinSize = new Size(radGridView1.GridViewElement.TableElement.VScrollBar.Size.Width + 30, radGridView1.GridViewElement.TableElement.VScrollBar.Size.Height);

For the Horizontal one, the same but use HScrollBar.MinSize.

If you have any more questions please just let me know, and if the question has been solved, please mark the all of the helpfull posts as answers, so that others can find the answers to their questions faster.

Best Regards,
Emanuel Varga

Telerik WinForms MVP
0
CJ
Top achievements
Rank 1
answered on 20 May 2011, 04:14 PM

Hi,
 
Thank you it worked out well. Just that for HScrollBar i had to increase the height instead of width like this

radGridView1.GridViewElement.TableElement.HScrollBar.MinSize =

 

new Size(radGridView1.GridViewElement.TableElement.HScrollBar.Size.Width, radGridView1.GridViewElement.TableElement.HScrollBar.Size.Height + 20);

 


Thanks for the support

thanks
J Sagayanathan
0
Ivan Petrov
Telerik team
answered on 23 May 2011, 09:20 PM
Hello Sagayanathan,

Pleas consider Emanuel's code snippet, as it demonstrates the correct way to change the size of RadGridView scroll bars. Should you have further questions feel free to ask. 

All the best,
Ivan Petrov
the Telerik team
Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
0
Michael Flynn
Top achievements
Rank 2
answered on 25 Mar 2014, 06:59 PM
radGridView1.GridViewElement.TableElement.VScrollBar.MinSize = newSize(radGridView1.GridViewElement.TableElement.VScrollBar.Size.Width + 30, radGridView1.GridViewElement.TableElement.VScrollBar.Size.Height);

when I use this I get the following error...

GridViewElement is not a member of RadGridView?
0
Ivan Petrov
Telerik team
answered on 28 Mar 2014, 08:36 AM
Hello Michael,

Thank you for writing.

GridViewElement is a property of RadGridView from the moment RadGridView was introduced. There should not be a situation where the property is missing. Can you please verify that you are referencing the Telerik.WinControls.GridView assembly and you have not created a new RadGridView class by mistake. Also you can try to create a new test project, add the needed references and try the code again.

If none of these work, I would kindly ask you to send me your project or a sample so I can investigate the issue further.

Looking forward to your reply.

Regards,
Ivan Petrov
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
Tags
GridView
Asked by
CJ
Top achievements
Rank 1
Answers by
Emanuel Varga
Top achievements
Rank 1
CJ
Top achievements
Rank 1
Ivan Petrov
Telerik team
Michael Flynn
Top achievements
Rank 2
Share this question
or