Frozen Columns - Cannot read property 'cells' of undefined

3 posts, 0 answers
  1. Sasha
    Sasha avatar
    2 posts
    Member since:
    Apr 2014

    Posted 04 Dec 2018 Link to this post

    Hello everyone,

    our team found the issue in frozen columns functionality. If grid has no data, user can not scrolling header to the right.

    Maybe we incorrect using this functionality. I created small demo that is based on a server-side binding, but problem is still, after scrolling in developer tools we can see JS error "Uncaught TypeError: Cannot read property 'cells' of undefined
            at Object.Telerik.Web.UI.Grid.frozenScrollHanlder (Telerik.Web.UI.WebResource.axd... :3454)
        at <anonymous>:1:21"

  2. Sasha
    Sasha avatar
    2 posts
    Member since:
    Apr 2014

    Posted 04 Dec 2018 Link to this post

    Sorry, I accidentally pressed "Post"

    We are using RadGrid from Telerik ASP.NET Ajax library.

    This is my demo .aspx code:

    <!DOCTYPE html>
     
    <head runat="server">
        <title>Telerik ASP.NET Example</title>
    </head>
    <body>
        <form id="form1" runat="server">
            <telerik:RadScriptManager runat="server" ID="RadScriptManager1"/>
            <telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" runat="server">
                <ClientSettings>
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" FrozenColumnsCount="2"></Scrolling>
                </ClientSettings>
                <MasterTableView ></MasterTableView>
                <HeaderStyle Width="200px" />
            </telerik:RadGrid>
        </form>
    </body>
    </html>

     

    This is my demo .vb code:

    Imports Telerik.Web.UI
     
    Public Class Demo
        Inherits System.Web.UI.Page
     
        Public Class PersonData
            Private _ID As Int16
            Private _Name As String
            Private _Age As Int16
     
            Public Property ID() As Int16
                Get
                    Return _ID
                End Get
                Set(ByVal Value As Int16)
                    _ID = Value
                End Set
            End Property
     
            Public Property Name() As String
                Get
                    Return _Name
                End Get
                Set(ByVal Value As String)
                    _Name = Value
                End Set
            End Property
     
            Public Property Age() As Int16
                Get
                    Return _Age
                End Get
                Set(ByVal Value As Int16)
                    _Age = Value
                End Set
            End Property
     
        End Class
     
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
     
        End Sub
     
        Private Sub RadGrid1_NeedDataSource(sender As Object, e As GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
            RadGrid1.DataSource = New List(Of PersonData)
        End Sub
    End Class

     

     

  3. Marin Bratanov
    Admin
    Marin Bratanov avatar
    4489 posts

    Posted 06 Dec 2018 Link to this post

    Hi Sasha,

    I was not able to reproduce this with our latest version (R3 2018 at the moment) so I would advise that you upgrade to it to get it fixed. If you can reproduce such an error with the latest version, please open a support ticket and send us a runnable example we can investigate, because the provided snippets work fine on my end and I do not get errors.


    Regards,
    Marin Bratanov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top