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

Scroll RadGrid Horizontally

5 Answers 185 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Ed asked on 31 Aug 2011, 04:29 AM

Hi,
 I have needs to make RadGrid scroll Horizontally, here is my code:

RadGrid1.Width = Unit.Percentage(100);
RadGrid1.MasterTableView.Width = Unit.Pixel(2100);
RadGrid1.ClientSettings.Scrolling.AllowScroll = true;

It's not working, the grid just extends horizontally. it will work if I assign a fixed width to RadGrid1 instead of using 100%, but tha's not what I want. 

Please help 

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 31 Aug 2011, 04:59 AM
Hello Ed,

In order to display horizontal scroll for navigation, you need to make sure that the total width of the columns (either auto-generated or declaratively set) exceeds the width of the grid.Check the following demo for further information
Grid / Scrolling.

Thanks,
Shinu.
0
Ed
Top achievements
Rank 1
answered on 01 Sep 2011, 03:43 AM
This is not what I am looking for, I am calling a web service that return collection of objects that have about 20 - 40 properties, by default RadGrid tries to pack all these properties into the grid with 100% width, that make it impossible to read, the only option I can think of is to make grid data area wider, I succeeded in increasing MasterTableView width, but I don't want the grid to extend horizontally.
0
Pavlina
Telerik team
answered on 02 Sep 2011, 03:35 PM
Hello Ed,

In order to have a horizontal RadGrid scrollbar, I suggest that you set the TableLayout of the MasterTableView to "Fixed", remove the MasterTableView's width and make sure that if you are setting column widths, their sum exceed the width of RadGrid.

Let us know if you need more information.

Greetings,
Pavlina
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Ed
Top achievements
Rank 1
answered on 03 Sep 2011, 12:27 AM
Hello Pavlina,
 
I already set MasterTableView Layout to Fixed. The problem I have, I put this grid in an user control that accepts data from different sources. At design time, there are no ways to know how many columns the grid will have, also no ways to know which columns require larger spaces. But I actually create columns at run time based on the data returned from data stores,  similar problems though,  very difficult to determine spaces for each column.

Thanks again. 
0
Pavlina
Telerik team
answered on 03 Sep 2011, 11:58 AM
Hi Ed,

Can you please isolate the problem in a sample project and send it to us via a support ticket, so that we can test it locally and provided a proper solution for your case?

Greetings,
Pavlina
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Grid
Asked by
Ed
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Ed
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or