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

[Solved] Virtual Scrolling Problems

1 Answer 146 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Adrian Porger
Top achievements
Rank 1
Adrian Porger asked on 13 Jan 2008, 05:21 PM
Hey folks, I am trying to use the virtual scrolling feature but when I scroll down always a null reference exception at the server is raised.. however when I use the pager symbols and go to second page, or sort the grid by clicking on a column header the error is not longer raised and virtual scrolling works as expected.

my setup is a bit more complex as I use the grid control in an ASP.net UserControl which stores the data in a session variable like this.


Public Property ViewSource() As System.Data.DataView

Get

If m_ViewSource Is Nothing Then
m_ViewSource = CType(Session(Me.UniqueID), Data.DataView)

End If

Return Me.m_ViewSource

End Get

Set(ByVal Value As System.Data.DataView)

Session.Add(Me.UniqueID, Value)

m_ViewSource = Value

End Set

End Property

Private Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource

Me.RadGrid1.DataSource = Me.ViewSource

End Sub


The grid is populated like this:

Public
Sub LoadView(ByVal viewtable As DataTable)

Try

Dim view As New Data.DataView

 view.Table = viewtable

Me.ViewSource = view

Me.RadGrid1.DataSource = Me.ViewSource

Me.RadGrid1.Rebind()

Catch ex As Exception

RaiseEvent ErrorEvent(Me, New ErrorEventArgs(ex))

End Try

End Sub


Any help would be highly appreciated

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 15 Jan 2008, 02:26 PM
Hello Adrian,

Based on the information supplied thus far I suspect that the issue is related either with the databinding of the control, or with the way the user control is loaded. However, in order to properly assist you, I would suggest that you open a formal support ticket and send us a small working project, incorporating your logic, and showing the problematic behavior. We will review it locally, and advise you further.

Regards,
Yavor
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Adrian Porger
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or