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

Horizontal scrolling in gridview

1 Answer 1897 Views
GridView
This is a migrated thread and some comments may be shown as answers.
m
Top achievements
Rank 1
m asked on 02 Oct 2009, 02:00 PM
Is it possible to enable horizontal scrolling in the grid? I can't see an option to do this.

For example if I have a large number of columns I'd like the horizontal scrollbar to be displayed as opposed to all the columns being squashed to fit.

I've been looking for an AllowScroll as found here: http://demos.telerik.com/aspnet-ajax/grid/examples/client/scrolling/defaultcs.aspx but as yet I'm still unsure how to do this with the winforms grid.

Thanks

M.

1 Answer, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 02 Oct 2009, 02:36 PM
Hello m,

Horizontal scrolling is turned on by default. However, when AutoSizeColumnsMode is set to Fill, columns are resized to fit the available space in RadGridView. In this mode, scroll bars are not visible. Use the following code to change the AutoSizeColumnsMode property:

this.radGridView1.MasterGridViewTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.None; 

You can control the scrollbar visibility by VerticalScrollState and HorizontalScrollState properties of MasterGridViewInfo. You can set them to AlwaysHide, AlwaysShow, and AutoHide (default).

I hope this helps. If you have further questions, please write me back.

Kind regards,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
m
Top achievements
Rank 1
Answers by
Jack
Telerik team
Share this question
or