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

Grid width 100% with scrollbars

3 Answers 227 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Technology
Top achievements
Rank 1
Technology asked on 10 Dec 2010, 11:11 AM
Dear Telerik support,

When i use width=100%, the grid is showing all the columns (22 columns) and makes the master page bigger (in width). I must use the horizontal scrollbar of the page, in order to see the other columns (i have 4:3 monitor). (Image1)

When i use width=750px, the grid is showing the first 15 columns with the grid scrollbars enable. Correct. But when i see the page in a wide screen (16:9), there is an empty space on the right of the screen. (image2)

So i want to use all the width of the page (100% of the screen, not bigger) with the horizontal scrollbars enabled.
Is there a way to do this??

Thank you in advance for your time.

Best Regards,
George.
Navarino Technology Department.

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 10 Dec 2010, 05:27 PM
Hello Technology,

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 as demonstrated in the following online demo:
http://demos.telerik.com/aspnet-ajax/grid/examples/client/scrolling/defaultcs.aspx

Regards,
Pavlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
JonathanElsner
Top achievements
Rank 1
answered on 21 Mar 2012, 04:59 PM
In this sample you are setting the  width to 750px, can this work without setting the width but having it %100?

<telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" ShowFooter="True" GridLines="None"
            AllowSorting="True" Width="750px" runat="server" AutoGenerateColumns="false">
            <PagerStyle Mode="NumericPages" />
            <MasterTableView Width="100%">
0
Pavlina
Telerik team
answered on 26 Mar 2012, 02:37 PM
Hi,

Yes, it will work, but you need to remove 100 % width property from your MasterTableView tag, set its TableLayout property to Fixed and declare HeaderStyle-Width for your columns.

Regards,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Technology
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
JonathanElsner
Top achievements
Rank 1
Share this question
or