Check if verticalScroll is displayed

5 posts, 1 answers
  1. Filleau
    Filleau avatar
    114 posts
    Member since:
    Jun 2006

    Posted 06 Sep 2010 Link to this post

    Hi,

    Working in VB.Net with the last release.

    How can I test is there is a verticalscroll bar in my RadGrid ?

    Or is there a way to force a column to fit the space unused ?

    Thanks
  2. Filleau
    Filleau avatar
    114 posts
    Member since:
    Jun 2006

    Posted 08 Sep 2010 Link to this post

    Hi

    So nobody can help me ?

    I have four columns

    Column(0) have a ficxed width(200px)
    Column (1) is set to "No visible"
    Column (2) must have a variable width
    Column (3) is et to fixed width (100px)

    How to tel column(2) must occup the rest of the Radgridview ? (must important when resizing form). I try to find the column(2).width when resizing the radgridview but for this I need to know if vertical scroll is displayed or not...

    Thanks

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Answer
    Svett
    Admin
    Svett avatar
    728 posts

    Posted 09 Sep 2010 Link to this post

    Hello Filleau,

    You can achieve that by setting the AutoSizeColumnsMode property to GridViewAutoSizeColumnsMode.Fill. In addition you have to set the AllowResize property of all columns except the column that you want to occupy the rest of the space. Notice that these column won't be available for resizing by the user:

    Me.radGridView1.DataSource = Data.GetDummyEmployees()
     
    Me.radGridView1.Columns("ID").AllowResize = False
    Me.radGridView1.Columns("Name").AllowResize = False
    Me.radGridView1.Columns("HireDate").AllowResize = False
    Me.radGridView1.Columns("SSN").AllowResize = True
    Me.radGridView1.Columns("SelfEmployeed").AllowResize = False
    Me.radGridView1.Columns("Description").AllowResize = False
     
    Me.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill

    We have already planned to extend the default behavior of the grid to allow your scenario out of the box.

    You can determine whether the vertical scroll bar is visible by accessing its Visibility property:

    Dim vSrollBarIsVisible As Boolean = Me.radGridView1.TableElement.VScrollBar.Visibility = Telerik.WinControls.ElementVisibility.Visible

    Kind regards,
    Svett
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  5. Filleau
    Filleau avatar
    114 posts
    Member since:
    Jun 2006

    Posted 10 Sep 2010 Link to this post

    Hi,
    Thanks a lot. It's near perfect.

    I was thinking that it will be great to have the possibility to set the size in % (like in HTML). like this, we could have any number of fixed or resizable columns.


    Regards,

    Anthony
  6. Svett
    Admin
    Svett avatar
    728 posts

    Posted 15 Sep 2010 Link to this post

    Hi Filleau,

    I am glad that my solution resolved your case.

    Thank you for your feedback. We will consider it as feature request. If more customers request the same functionality, we will increase the priority of this task.

    Sincerely yours,
    Svett
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
Back to Top
UI for WinForms is Visual Studio 2017 Ready