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

VirtualQueryableCollectionView issues

3 Answers 163 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nicolas
Top achievements
Rank 1
Nicolas asked on 22 Oct 2010, 03:39 PM
Hi,

I am currently using 2010 Q3 beta especially to try the new VirtualQueryableCollectionView class.

I implemented a sample project based on the code from your demo (First Look). The only difference is that I am not using a DataContext and keeping data in memory, I am calling a web service to get the data each time.

The control is working quite nicely but I am having 2 issues right now.

A) The collection seems good for a paged grid, but I am using virtual scrolling. What happens is that when I scroll down to data that is not loaded yet, the Collection loads the missing data but the data that were there before disappears (see here).

B) When I scroll back up to the very first row, the ItemsLoading event is not fired, thus the grid remains blank (because of issue A).

Those issues do not happen in your demo, and they did not happen to me when I bound the grid to in-memory data. Getting the data through a web service is what causes it. Please find attached relevant code that may explains what I possibly did wrong.

I assume B is fixed when A is fixed, so my question will mostly be: how to fix A? ;)

Thanks


Private _Data As VirtualQueryableCollectionView
Public Property Data() As VirtualQueryableCollectionView
    Get
        If _Data Is Nothing Then
            _Data = New VirtualQueryableCollectionView
            _Data.VirtualItemCount = 999999
            _Data.LoadSize = 100
            AddHandler _Data.ItemsLoading, AddressOf ItemsLoading
        End If
        Return _Data
    End Get
    Private Set(ByVal value As VirtualQueryableCollectionView)
        If Me._Data IsNot value Then
            RemoveHandler _Data.ItemsLoading, AddressOf ItemsLoading
 
            Me._Data = value
        End If
    End Set
End Property
 
 
Private Sub ItemsLoading(ByVal sender As Object, ByVal e As VirtualQueryableCollectionViewItemsLoadingEventArgs)
    Dim tServClient As New ElementViewService.svc_ElementViewServiceClient
    AddHandler tServClient.GetDataCompleted, AddressOf ItemsLoaded
    tServClient.GetDataAsync(Nothing, Nothing, Nothing, e.StartIndex, 100, e.StartIndex)
End Sub
 
 
Private Sub ItemsLoaded(ByVal sender As Object, ByVal e As ElementViewService.GetDataCompletedEventArgs)
    Dim tDS As New DataSet
    tDS.FromXml(e.Result)
    Data.Load(e.UserState, tDS.Tables(0).GetBindableData(New Connector))
End Sub
 
 
Public Sub New()
    InitializeComponent()
 
    grid.ItemsSource = Data
End Sub

ps: the GetData method of the web service returns a 3rd party DataSet for Silverlight ; the .GetBindableData returns an IEnumerable. Wo do that because our data is all dynamic so it's just easier and as efficient as creating dynamic objects.

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 28 Oct 2010, 02:13 PM
Hello Nicolas,

Can you send us this project via support ticket to check locally what is going on?

Kind regards,
Vlad
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
Alex Sorokoletov
Top achievements
Rank 1
answered on 23 Nov 2010, 02:11 PM
Hi!
Is this issue fixed or not?
0
Nicolas
Top achievements
Rank 1
answered on 23 Nov 2010, 02:15 PM
Hi,

I do believe this was fixed in the official Q3 release as I cannot reproduce it anymore.
Tags
General Discussions
Asked by
Nicolas
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Alex Sorokoletov
Top achievements
Rank 1
Nicolas
Top achievements
Rank 1
Share this question
or