RadGrid vertical and horizontal scroll bar width

6 posts, 1 answers
  1. CJ
    CJ avatar
    6 posts
    Member since:
    Dec 2010

    Posted 18 May 2011 Link to this post

    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
  2. Answer
    Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 20 May 2011 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. CJ
    CJ avatar
    6 posts
    Member since:
    Dec 2010

    Posted 20 May 2011 Link to this post


    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
  5. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 23 May 2011 Link to this post

    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.
  6. Michael Flynn
    Michael Flynn avatar
    3 posts
    Member since:
    Nov 2005

    Posted 25 Mar 2014 in reply to Ivan Petrov Link to this post

    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?
  7. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 28 Mar 2014 Link to this post

    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.

     
Back to Top
UI for WinForms is Visual Studio 2017 Ready