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

Problem in hiding vertical scroll bar

1 Answer 363 Views
GridView
This is a migrated thread and some comments may be shown as answers.
James Baddiley
Top achievements
Rank 1
James Baddiley asked on 13 Jun 2011, 11:09 AM
Hello Experts!

I am currently facing a problem while using the Rad Grid View. I want to hide the vertical scroll bar. When i try to set the AutoSize property to true and AutoSizeColumnMode property to fill, then all the columns in the rad grid view disappears. On the other hand if i set AutoSize property to true and  AutoSizeColumnMode property to none, the scroll bar disappears but the grid doesn't stretch enough horizontally to fill the parent container. Now can you guys tell me how can i hide vertical scroll bar as well as stretch the column enough to fill the parent?

Thanks... 

1 Answer, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 15 Jun 2011, 11:04 AM
Hi William,

When RadGridView is in AutoSize mode, the control width is determined by the sum of all column widths. In this mode the Fill column sizing mode is not supported and you have to set the column width manually or you have to call the BestFitColumn method. You can hide the vertical scroll bar by setting the VerticalScrollState property to AlwaysHide:
radGridView1.VerticalScrollState = ScrollState.AlwaysHide;

I hope this helps. If you have any further questions, do not hesitate to ask.
 
Greetings,
Jack
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.
Tags
GridView
Asked by
James Baddiley
Top achievements
Rank 1
Answers by
Jack
Telerik team
Share this question
or