HeaderTemplate gives JavaScript error

12 posts, 0 answers
  1. Dan
    Dan avatar
    17 posts
    Member since:
    Oct 2010

    Posted 15 Oct 2010 Link to this post

    When I put a HeaderTemplate on my RadListBox it triggers an "Error: '2.offsetHeight' is null or not an object".  The form still shows but the header is very tall.  I have defined a css to get the height set correctly.

    <style type="text/css" >
        .RadListBox1 div.rlbHeader
        {
            height:25px;
        }
    </style>

    Below is the RadListBox definition

    <asp:Panel runat="server" id="pnlCustomFieldListValues" CssClass="fieldPanel" Visible="false">
        <div style="float: left; width: 750px;">
            <asp:Label ID="Label2" runat="server"
                        AssociatedControlId="radCustomFieldListValues"
                        Text="List Values:" />
            <telerik:RadListBox runat="server" ID="radCustomFieldListValues"
                                Width="100%" Height="200px"
                                SelectionMode="Single"
                                AllowReorder="true" 
                                AllowDelete="true"
                                EnableDragAndDrop="true"
                                DataValueField="Id" 
                                ButtonSettings-ReorderButtons="All" 
                                ButtonSettings-ShowDelete="true" 
                                CssClass="RadListBox1"
                                >
            <HeaderTemplate>
                <asp:Label runat="server" Width="200" Text="Name" />
                <asp:Label runat="server" Width="200" Text="Value" />
            </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label 
                        runat="server" ID="lblListValueName" Width="200" 
                        Text='<%# DataBinder.Eval(Container.DataItem, "Name")%>' />
                    <asp:Label 
                        runat="server" ID="lblListValue" Width="200" 
                        Text='<%# DataBinder.Eval(Container.DataItem, "Value")%>' />
                </ItemTemplate>
            </telerik:RadListBox>
        </div>
    </asp:Panel>

    Thanks for your help,
    Dan
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 21 Oct 2010 Link to this post

    Hi Dan,

    I tried to reproduce this issue but to no avail. Can you please send us a live url where the problem can be observed? Thanks

    All the best,
    Yana
    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Thorgeir Berre
    Thorgeir Berre avatar
    5 posts
    Member since:
    Nov 2008

    Posted 22 Oct 2010 Link to this post

    Hi
    I have got the same problem. It only appears on deployment server, not on my dev. machine.


    - Thorgeir
  5. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 22 Oct 2010 Link to this post

    Hello Thorgeir,

    Please send us more details so we to be able to reproduce the problem. Thanks in advance

    All the best,
    Yana
    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
  6. Dan Foster
    Dan Foster avatar
    21 posts
    Member since:
    Jun 2010

    Posted 22 Oct 2010 Link to this post

    I have just discovered this problem as well. And it seems to only happen when you have IE8 in compatibility mode.

    I have tested not setting the Height property and it works ok. As soon as I add it back in again the error appears. 
  7. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 26 Oct 2010 Link to this post

    Hi Dan,

    Thank you for the note - the problem can be reproduced in IE8 CompatibilityMode, IE7 and IE6. I've logged it and it will be fixed as soon as possible. We're sorry for the inconvenience.

    Best regards,
    Yana
    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
  8. Andrew
    Andrew avatar
    5 posts
    Member since:
    Oct 2010

    Posted 16 Nov 2010 Link to this post

    Hello,

    I have discovered this problem today also. Has a resolution been found?

    Many thanks
    Andrew
  9. Michael Rogers
    Michael Rogers avatar
    22 posts
    Member since:
    Mar 2010

    Posted 16 Nov 2010 Link to this post

    It appears to be fixed in 2010 Q3, i'm still having an issue where its not rendereing exactly the same but i'm not able to reproduce it in a sample poject.  I haven't had much time to look at it.  Its a lot better than it was in my case nothing would show up.

    Michael
  10. Andrew
    Andrew avatar
    5 posts
    Member since:
    Oct 2010

    Posted 16 Nov 2010 Link to this post

    Thanks Michael. The release notes address the issue alright.

    http://www.telerik.com/versionnotes.aspx?id=2334

    I'm downloading at the moment to see if it resolves the issue.

    Andrew
  11. Andrew
    Andrew avatar
    5 posts
    Member since:
    Oct 2010

    Posted 16 Nov 2010 Link to this post

    Fantastic. Problem resolved with 2010 Q3 release.

    Thanks
    Andrew
  12. Daniel Plomp
    Daniel Plomp avatar
    130 posts
    Member since:
    Feb 2004

    Posted 19 Nov 2010 Link to this post

    Great that this is fixed. But I'm using the controls in Sitefinity 3.7 SP4. Is there a workaround?

    Thanks,
    Daniel
  13. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 25 Nov 2010 Link to this post

    Hello Daniel,

    The work-around is not to set Height property of the listbox. We're sorry for the inconvenience.

    Greetings,
    Yana
    the Telerik team
    Browse the vast support resources we have to jumpstart 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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017