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

[Solved] Radgrid

1 Answer 129 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ayesha
Top achievements
Rank 1
Ayesha asked on 04 Mar 2010, 09:56 PM

 

Hi,

I've a radgrid wrapped inside a panel.
The cssclass 'panel_css'  contains height and width of 100%.

the problem I'm facing is in compatibilty mode on, the below code is fine. It renders properly.

But if compatibility mode is turned off, then when I resize the columns by moving the column handle, the whole grid can be stretched beyond the width of the screen. I don't want this weird behaviour. the grid should always be fixed(but I don't want to give width in pixels). I even tried setting the table layout to fixed. but this didn't work.

Note: the grid stretches beyond the width of the screen only if compatibility is turned off.
If compatibility is turned on, this works fine.

<
asp:Panel ID="panel1"

 

 

runat="server"

 

 

CssClass ="panel_css">

 

 

<telerik:RadGrid ID="m_radGrid"

 

 

GridLines="None"

 

 

runat="server"

 

 

AllowMultiRowSelection= "True"

 

 

AllowFilteringByColumn= "True"

 

 

onneeddatasource = "m_radGrid_NeedDataSource"

 

 

OnSelectedIndexChanged = "m_radGrid_SelectedIndexChanged"

 

 

OnItemCommand = "m_radGrid_ItemCommand" OnItemDataBound ="m_radGrid_ItemDataBound" TabIndex = "0">

 

 

<MasterTableView AllowPaging="true" AllowSorting="true" AllowFilteringByColumn="true"

 

 

PagerStyle-Mode="NextPrevAndNumeric" PageSize="10">

 

 

<PagerStyle AlwaysVisible="true" />

 

 

<RowIndicatorColumn>

 

 

<HeaderStyle/>

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn>

 

 

<HeaderStyle />

 

 

</ExpandCollapseColumn>

 

 

</MasterTableView>

 

 

<GroupingSettings CaseSensitive="false" />

 

 

<ClientSettings AllowKeyboardNavigation="True" Selecting-AllowRowSelect="true" Resizing-AllowColumnResize="true">

 

<Scrolling AllowScroll ="true" SaveScrollPosition ="true" UseStaticHeaders ="true"/>

 

 

</ClientSettings>

 

 

</telerik:RadGrid>

 

 

</asp:Panel>

 

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 09 Mar 2010, 01:51 PM
Hello Ayesha,

Keep in mind that if the grid is nested inside containers, at least one of them should have fixed height dimension in pixels. Thus the control will calculate its dimensions in regards with this container pixel height.

For more information, please refer to the following code library:
Setting 100% height and resize on container resize for grid with scrolling and static headers

Best wishes,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Ayesha
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or