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

Check if verticalScroll is displayed

4 Answers 160 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Filleau
Top achievements
Rank 1
Filleau asked on 06 Sep 2010, 11:39 AM
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

4 Answers, 1 is accepted

Sort by
0
Filleau
Top achievements
Rank 1
answered on 08 Sep 2010, 01:48 PM
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

0
Accepted
Svett
Telerik team
answered on 09 Sep 2010, 01:27 PM
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
0
Filleau
Top achievements
Rank 1
answered on 10 Sep 2010, 05:36 AM
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
0
Svett
Telerik team
answered on 15 Sep 2010, 03:44 PM
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
Tags
GridView
Asked by
Filleau
Top achievements
Rank 1
Answers by
Filleau
Top achievements
Rank 1
Svett
Telerik team
Share this question
or