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

Grid display problem. Need help.

4 Answers 39 Views
Grid
This is a migrated thread and some comments may be shown as answers.
towpse
Top achievements
Rank 2
towpse asked on 14 Apr 2010, 09:56 PM
I'm having a grid issue. I'm not sure what started to cause it. I know it wasn't behaving this way until recently it was introduced somehow.
I'm wondering if anyone else has seen symptoms like this.

So,
I have this simple grid. 

<telerik:RadGrid runat="server" ID="grider" Skin="Office2007" AutoGenerateColumns="false" AllowMultiRowSelection="true" Width="300" height="100" > 
      <MasterTableView runat="server" ClientDataKeyNames="DataPointId,IsEnabled, HasMultiple"  ShowHeader="false" TableLayout="Fixed"
        <NoRecordsTemplate> 
           <asp:Localize ID="Localize3" runat="server" Text="<%$ Resources:Resource, NO_AVAILABLE_ALERTS %>" />
</NoRecordsTemplate
        <Columns> 
           <telerik:GridBoundColumn UniqueName="Display" DataField="Display" HeaderText="<%$ Resources:Resource, DISPLAY %>" /> 
        </Columns> 
      </MasterTableView> 
      <ClientSettings AllowKeyboardNavigation="True" EnableRowHoverStyle="true"
           <Scrolling UseStaticHeaders="true" AllowScroll="true" /> 
           <Selecting AllowRowSelect="true" /> 
           <ClientEvents OnRowDataBound="RowDataBound" OnRowCreated="RowCreated" OnRowSelected="GridAddRowSelected" OnRowSelecting="RowSelecting" OnRowDeselected="GridAddRowDeselected"/> 
       </ClientSettings> 
</telerik:RadGrid> 

It's sitting inside a div structure a few layers deep.
I use it to change the UI based on a page mode.

If I hide the parent div in javascript like so  $get('divParent').style.display = 'none';
in order to display other controls
the grid doesn't hide. it just floats above the other controls that are now visible

this is only in IE. might anyone know why this is happening?

regards


4 Answers, 1 is accepted

Sort by
0
towpse
Top achievements
Rank 2
answered on 16 Apr 2010, 08:27 PM
bump?
0
Dimo
Telerik team
answered on 19 Apr 2010, 09:24 AM
Hi Matt,

In my opinion the problem is not related to RadGrid. Please validate the page HTML markup. It is also possible that some IE rendering bug is triggered.

If the problem persists, please send us a runnable demo to take a look.

Here is a test page, which works as expected.

<%@ Page Language="C#" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 
<head id="Head1" runat="server">
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>RadControls</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
 
<asp:Button ID="Button1" runat="server" Text="Toggle RadGrid display" OnClientClick="return toggleDisplay()" />
 
<script type="text/javascript">
 
function toggleDisplay()
{
    var parentDiv = $get('divParent');
    parentDiv.style.display = parentDiv.style.display == "none" ? "" : "none";
    return false;
}
 
</script>
 
<div>
    content before RadGrid
</div>
 
<div id="divParent">
 
<telerik:RadGrid runat="server" ID="grider" Skin="Office2007" AutoGenerateColumns="false" AllowMultiRowSelection="true"
    Width="300" height="100" DataSourceID="XmlDataSource1">
      <MasterTableView ClientDataKeyNames="DataPointId,IsEnabled,HasMultiple" ShowHeader="false" TableLayout="Fixed">
        <NoRecordsTemplate>
           NoRecordsTemplate
        </NoRecordsTemplate>
        <Columns>
           <telerik:GridBoundColumn UniqueName="Display" DataField="Display" HeaderText="HeaderText" />
        </Columns>
      </MasterTableView>
      <ClientSettings AllowKeyboardNavigation="True" EnableRowHoverStyle="true">
           <Scrolling UseStaticHeaders="true" AllowScroll="true" />
           <Selecting AllowRowSelect="true" />
       </ClientSettings>
</telerik:RadGrid>
 
</div>
 
<div>
    content after RadGrid
</div>
 
<asp:XmlDataSource ID="XmlDataSource1" runat="server">
<Data>
<nodes>
    <node DataPointId="1" IsEnabled="true" HasMultiple="true" Display="false" />
    <node DataPointId="2" IsEnabled="true" HasMultiple="false" Display="false" />
    <node DataPointId="3" IsEnabled="false" HasMultiple="true" Display="false" />
    <node DataPointId="4" IsEnabled="false" HasMultiple="false" Display="true" />
    <node DataPointId="5" IsEnabled="true" HasMultiple="true" Display="true" />
    <node DataPointId="6" IsEnabled="false" HasMultiple="false" Display="true" />
</nodes>
</Data>
</asp:XmlDataSource>
 
</form>
</body>
</html>


Sincerely yours,
Dimo
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.
0
towpse
Top achievements
Rank 2
answered on 28 Apr 2010, 04:34 PM
This was a CSS issue.
There was relative positioning attached to the parent div of the grid (although not the grid itself)
Removing the relative positioning, which was thought necessary for other aspects of the UI, fixes the issue 
but I'm still uncertain and confused by why the relative positioning on the parent would effect the grid like this;
especially since I am setting the display to none!

regards
0
Dimo
Telerik team
answered on 29 Apr 2010, 12:36 PM
Hello Matt,

So it seems like a browser problem. If you have some free time to provide a simple runnable demo, I will gladly take a look, so that we are familiar with the issue for future reference.

Kind regards,
Dimo
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
towpse
Top achievements
Rank 2
Answers by
towpse
Top achievements
Rank 2
Dimo
Telerik team
Share this question
or