Data Virtualization ItemsLoading Event not Calling

2 posts, 0 answers
  1. victor
    victor avatar
    5 posts
    Member since:
    Jun 2015

    Posted 30 Nov 2015 Link to this post

    Hi Team

    The Data Virtualization  view.ItemsLoading += (s, args) =>  event not calling  is there anything more to do with this . my code is below please help me on this.

    C# code:-

    VirtualView = new VirtualQueryableCollectionView() { LoadSize = 500, VirtualItemCount = 200 };
    VirtualView.ItemsLoading += (s, e) =>
    {
    var querytoLoad = dcBusinessAccountingContext.GetDepositListingSPQuery(search, searchDate, status).OrderByDescending(o => o.TransactionDate).IncludeTotalCount(true).Sort(VirtualView.SortDescriptors).Where(VirtualView.FilterDescriptors).Skip(e.StartIndex).Take(e.ItemCount);
    dcBusinessAccountingContext.Load<DepositsListingSP_Result>(querytoLoad, LoadBehavior.MergeIntoCurrent, false).Completed += (senders, args) =>
    {
    var lo = (LoadOperation)senders;
    if (lo.TotalEntityCount != -1 && lo.TotalEntityCount != VirtualView.VirtualItemCount)
    {
    VirtualView.VirtualItemCount = lo.TotalEntityCount;
    }
    else
    {

    }
    VirtualView.Load(e.StartIndex, lo.Entities);
    newdepositListing.BusyIndicator.IsBusy = false;
    SetGridLinesVisibility.SetGridLines(newdepositListing.dtgdepositList);
    GridViewScrollViewer scrollViewer = newdepositListing.dtgdepositList.ChildrenOfType<GridViewScrollViewer>().FirstOrDefault();
    objApplicationClass.AdjustFooterHeight(newdepositListing.dtgdepositList, false);
    if (scrollViewer != null)
    {
    if (scrollViewer.ComputedVerticalScrollBarVisibility == System.Windows.Visibility.Visible)
    {
    objApplicationClass.AdjustFooterHeight(newdepositListing.dtgdepositList, false);
    }
    else
    {
    objApplicationClass.AdjustFooterHeight(newdepositListing.dtgdepositList, true);
    }
    }
    };
    };
    newdepositListing.DataContext = VirtualView;

    Xaml Code:-

    <telerikpresentation:RadGridView x:Name="dtgdepositList" Margin="0" RowHeight="22" Grid.Row="1" Height="Auto"
    BorderThickness="0,1,0,0" IsReadOnly="True"
    AutoGenerateColumns="true" VerticalAlignment="Top"
    HorizontalAlignment="Stretch" IsFilteringAllowed="False"
    ShowColumnHeaders="True" ShowGroupPanel="False" ItemsSource="{Binding}"
    CanUserSelect="True" CanUserSortColumns="True" telerikpresentation:PersistenceManager.StorageId="dtgdepositList" CanUserFreezeColumns="False" IsEnabled="True" IsSynchronizedWithCurrentItem="False"
    CanUserResizeColumns="True" RowIndicatorVisibility="Collapsed"
    Cursor="Hand" MinWidth="850"
    GridViewHeaderMenu:ContextMenuBehaviour.IsEnabled="True" ShowColumnFooters="False"
    SelectedItem="{Binding Path=SelectedDepositListing, Mode=TwoWay}"
    ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" IsLocalizationLanguageRespected="False" >
    <i:Interaction.Behaviors>
    <EmptyDataTemplate:EmptyDataTemplateBehavior>
    <EmptyDataTemplate:EmptyDataTemplateBehavior.EmptyDataTemplate>
    <DataTemplate>
    <TextBlock Text="No results found!" Foreground="Red" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="{Binding MessageVisibility}" />
    </DataTemplate>
    </EmptyDataTemplate:EmptyDataTemplateBehavior.EmptyDataTemplate>
    </EmptyDataTemplate:EmptyDataTemplateBehavior>
    </i:Interaction.Behaviors>
    </telerikpresentation:RadGridView>

     

  2. Yoan
    Admin
    Yoan avatar
    1068 posts

    Posted 03 Dec 2015 Link to this post

    Hi Victor,

    Unfortunately with the supplied information I cannot figure out what is going on. Could you please try to isolate the problem you have in the sample project from my previous reply? Then you can send it to me for further investigation.

    As a side note - you can check our online demo which demonstrates how to use RadGridView with VQCV.


    Regards,
    Yoan
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
Back to Top