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

problem with Height="100%" and firefox

11 Answers 203 Views
Grid
This is a migrated thread and some comments may be shown as answers.
max
Top achievements
Rank 1
max asked on 23 Apr 2008, 10:12 AM
After upgraded in 2008.q1 controls I've a new issue with firefox, the height set to 100% dosen't works in fierfox:

ie:


firefox:


Code:
<Telerik:radsplitter ID="rs2" runat="server" orientation="Horizontal" width="100%" Height="100%" ResizeMode="AdjacentPane" > 
    <Telerik:radpane ID="rp3" runat="server" Height="32" Scrolling="None" CssClass="toolbar" > 
     
    </Telerik:radpane> 
    <Telerik:radpane ID="rp4" runat="server" scrolling="None" > 
 
        <Telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" 
            AllowCustomPaging="true" Width="100%" Height="100%" PageSize="30" 
            AllowSorting="True" AutoGenerateColumns="False" EnableAJAX="True" > 
        </Telerik:RadGrid>                      
 
    </Telerik:radpane> 
    <Telerik:RadSplitBar ID="rsb2"  runat="server"></Telerik:RadSplitBar> 
    <Telerik:RadPane runat="server" ID="rp5" Scrolling="None"
     
    </Telerik:RadPane> 
</Telerik:radsplitter> 

Is there any workaround about this?

11 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 23 Apr 2008, 12:13 PM
Hi Massimo,

Thank you for providing sample code. However, I used it to create a simple web application and RadGrid successfully expanded under Firefox (both 2.x and 3.0 beta). (ASPX file pasted below)

Could you please open a support ticket and send us a sample project demonstrating the problem you are talking about? Thank you in advance.

Here is the ASPX file I tested with:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"
<meta http-equiv="content-type" content="text/html;charset=utf-8" /> 
<title>RadGrid in RadSplitter</title> 
</head> 
<body> 
<form id="form1" runat="server"
<div> 
 
<asp:ScriptManager ID="ScriptManager1" runat="server" /> 
 
<telerik:radsplitter ID="rs2" runat="server" orientation="Horizontal" width="100%" Height="100%" ResizeMode="AdjacentPane" >  
    <telerik:radpane ID="rp3" runat="server" Height="32" Scrolling="None" CssClass="toolbar" >  
      
    </telerik:radpane>  
    <telerik:radpane ID="rp4" runat="server" scrolling="None" >  
  
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True"  
            AllowCustomPaging="true" Width="100%" Height="100%" PageSize="30"  
            AllowSorting="True" DataSourceID="XmlDataSource1"
        </telerik:RadGrid>                       
  
    </telerik:radpane>  
    <telerik:RadSplitBar ID="rsb2"  runat="server"></telerik:RadSplitBar>  
    <telerik:RadPane runat="server" ID="rp5" Scrolling="None">  
      
    </telerik:RadPane>  
</telerik:radsplitter>  
 
<asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/student.xml" /> 
 
</div> 
</form> 
</body> 
</html> 
 


Best wishes,
Dimo
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
max
Top achievements
Rank 1
answered on 23 Apr 2008, 01:47 PM
I've just opened a tiket, the problem appear when the grid is specified in the ajaxManager..
0
Konstantin Petkov
Telerik team
answered on 23 Apr 2008, 02:08 PM
Hi Massimo,

You can add the following to the head tag to set the Grid div wrapper's height as well:

#RadGrid1Panel  
{  
    height: 100%;  
}  



Sincerely yours,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Paul Smith
Top achievements
Rank 1
answered on 24 Apr 2008, 01:36 PM
Any further solutions to this. We have the same problem where a grid fits a page 100% fine but then as soon as it's placed in an AjaxPanel or AjaxManager then it won't resize in Mozilla.

I have tried setting the height on the AjaxPanel to be 100% but this doesn't work.

Paul
0
Dimo
Telerik team
answered on 24 Apr 2008, 01:46 PM
Hi Paul,

As RadAjaxPanel inherits Microsoft's UpdatePanel control, which does not provide a way to set styles server-side on the rendered <div> element. You just have to find out the client ID of this <div> and set a 100% height to it. I am sorry about this inconvenience.

Best wishes,
Dimo
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Paul Smith
Top achievements
Rank 1
answered on 24 Apr 2008, 01:58 PM
Is there an easy way to get the ID of the outer DIV?

<%= RadAjaxPanel.ClientID %> return the ID of the inner div not the outer div that I need to set the height on?
0
Dimo
Telerik team
answered on 24 Apr 2008, 03:31 PM
Hi Paul,

Yes, there is a way to find out the Client ID of the outer <div> by using the AjaxSettingCreated method in code-behind. Please find attached a project, which demonstrates this approach (assemblies not included). The project also shows how to construct a CSS rule for those <div>s on the server, so that there is no need to hard-code client ID's in the HTML.

For more information about AjaxSettingCreated, please consult

http://telerik.com/help/radcontrols/prometheus/?ajxSettingsCreated.html


Kind regards,
Dimo
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Paul Smith
Top achievements
Rank 1
answered on 24 Apr 2008, 03:37 PM
Hi,

I managed to get the style attached to the outer div created by the RadAjaxPanel not by the method you described but with some simple javascript.

Unfortunately it did not fix the problem. The grid still did not occupy 100% of the window in Mozilla.

Paul
0
Dimo
Telerik team
answered on 25 Apr 2008, 05:56 AM
Hi Paul,

Most probably, the javascript code is not executed at the right time, i.e. it is executed too late. Please make it execute earlier or the use one of the 2 methods provided in the previous posts.

Best wishes,
Dimo
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
ChrisS
Top achievements
Rank 1
answered on 27 May 2008, 06:48 PM
Hi,

I had the same problem, tried the code and it did not work for me either.

The sample code output the following:

<style type="text/css">  
    #ctl00_ContentPlaceHolder1_ctl00_ContentPlaceHolder1_rgDataPanel,#ctl00_ContentPlaceHolder1_ctl00_ContentPlaceHolder1_rgDataPanel,#ctl00_ContentPlaceHolder1_ctl00_ContentPlaceHolder1_rgDataPanel,#ctl00_ContentPlaceHolder1_ctl00_ContentPlaceHolder1_NamePanel{height:50%;width:100%;border:1px solid red}  
</style>  

where rgData is the name of my RadGrid.  Playing around with the styles the following worked for me:

<style type="text/css">  
    #ctl00_ContentPlaceHolder1_ctl00_ContentPlaceHolder1_rgDataPanel{height:100%;width:100%;}  
</style>  

I hope this helps someone!
0
Dimo
Telerik team
answered on 27 May 2008, 07:18 PM
Hi Chris,

May be the first code snippet is not working as expected because you are setting a 50% height, not 100%.

Best wishes,
Dimo
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
max
Top achievements
Rank 1
Answers by
Dimo
Telerik team
max
Top achievements
Rank 1
Konstantin Petkov
Telerik team
Paul Smith
Top achievements
Rank 1
ChrisS
Top achievements
Rank 1
Share this question
or