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

Horizontal Scrollbar / Height of RadGrid

1 Answer 255 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Danielle
Top achievements
Rank 1
Danielle asked on 24 Jul 2008, 12:37 AM
Hi there,

I have 2 questions:

1) I was wondering whether there is a way to place the horizontal scroll bar at the *top* of the RadGrid rather than have it in its default position at the bottom of the grid?

2) I have a radgrid embedded within an Ajax Panel with a panel height and width of 100%.
I have set my RadGrid to a height of 600px however I'd like it to be set to a percentage (say, 95% - meaning, 95% of the panel space) so that regardess of the screen resolution, the height of the grid takes up most of the screen. When I set it to any percentage, the entire grid shrinks and disappears into a thin grey-line. I can only seem to see the grid if the height is set in pixels. Can the height of the grid be set in percentages?

Many thanks,
Danielle

<telerik:radgrid id="ProjectPlanningRadGrid"
AllowFilteringByColumn="True"
AllowSorting="True"
AutoGenerateColumns="False"
DataSourceID="ProjectPlansDataSource"
GridLines="Horizontal"
OnDataBound="ProjectPlanningRadGrid_DataBound"
OnInit="ProjectPlanningRadGrid_Init"
OnItemCommand="ProjectPlanningRadGrid_ItemCommand" OnSortCommand="ProjectPlanningRadGrid_SortCommand"
runat="server"
ShowGroupPanel="True"
ShowFooter="True"
Skin="Office2007"
Height="600px"
OnItemCreated="ProjectPlanningRadGrid_ItemCreated"
GroupHeaderItemStyle-HorizontalAlign="Left" >

<

MasterTableView TableLayout="Fixed" DataSourceID="ProjectPlansDataSource"
CommandItemDisplay="Top" ShowGroupFooter="True" DataKeyNames="ProjectID" Width="350%" >

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 24 Jul 2008, 10:52 AM
Hi Danielle,

1) Horizontal scrollbars always appear at the bottom of the scrollable element, this is the way browsers work. However, you can create a custom implementation, in which a user scrolls a <div> element, placed above RadGrid and this scrolling forces RadGrid to scroll in the same direction as well. You can try to implement this with two ordinary <div>s and when you are ready, it will be easy to port the functionality to RadGrid.

2) If a web page element has a height style defined in percent, its parent must have a height as well. This rule applies recursively. RadGrid has a height in percent, the AjaxPanel has a height in percent, so please make sure that the parent of the AjaxPanel has height as well, either in percent or in pixels.


Kind regards,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Danielle
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or