Telerik Forums
UI for Silverlight Forum
14 answers
569 views
While viewing a virtual collection in the gridview if I load the first page, select a row, then move down to a page after the second page and attempt to close the multi selection with the shift key (multi-select across pages) the following error is thrown, any way to prevent this short of removing extended selection from the grid (currently have functionality tied to multiselect), maybe reset selection when page moves?:

System.ArgumentException: Cell is not valid  Parameter name: cellInfo    
at Telerik.Windows.Controls.GridView.Selection.CellInfoCollection.Contains(GridViewCellInfo cellInfo)    
at Telerik.Windows.Controls.GridView.Selection.RowTrackingRootSelectionStateChanger.UpdateCellsSelectionState(DataCellsPresenter cellsPresenter, CellInfoCollection cells, Boolean isSelected)    
at Telerik.Windows.Controls.GridView.Selection.RowTrackingRootSelectionStateChanger.UpdateCellSelectionState(LinkedList`1 trackingRoot, CellInfoCollection cells, Boolean isSelected)    
at Telerik.Windows.Controls.GridView.Selection.RowTrackingRootSelectionStateChanger.UpdateCellSelectionState(CellInfoCollection cells, Boolean isSelected)    
at Telerik.Windows.Controls.GridView.Selection.CellSelectionHandler.SetSelectionState(CellInfoCollection cellsCollection, Boolean isSelected)    
at Telerik.Windows.Controls.GridView.Selection.CellSelectionHandler.EndAllowedSelection()    
at Telerik.Windows.Controls.GridView.Selection.CellSelectionHandler.EndPendingSelection()    
at Telerik.Windows.Controls.GridView.Selection.CellSelectionHandler.EndSelection()    
at Telerik.Windows.Controls.GridView.CellSelectionChange.Dispose()    
at Telerik.Windows.Controls.GridView.Selection.CompositeSelectionHandler.Items_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)    
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)    
at Telerik.Windows.Data.DataItemCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e)    
at Telerik.Windows.Data.DataItemCollection.OnCollectionViewCollectionChanged(NotifyCollectionChangedEventArgs e)    
at Telerik.Windows.Data.DataItemCollection.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs e)    
at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)    
at Telerik.Windows.Data.QueryableCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)    
at Telerik.Windows.Data.VirtualQueryableCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)    
at Telerik.Windows.Data.QueryableCollectionView.ProcessSynchronousCollectionChangedWithAdjustedArgs(NotifyCollectionChangedEventArgs originalArguments, Int32 adjustedOldIndex, Int32 adjustedNewIndex)    
at Telerik.Windows.Data.QueryableCollectionView.ProcessAsynchronousCollectionChanged(NotifyCollectionChangedEventArgs args)    
at Telerik.Windows.Data.QueryableCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)    
at Telerik.Windows.Data.VirtualQueryableCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)    
at Telerik.Windows.Data.QueryableCollectionView.OnSourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)    
at Telerik.Windows.Data.QueryableCollectionView.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args)    
at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)    
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)    
at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)    
at System.Collections.ObjectModel.ObservableCollection`1.SetItem(Int32 index, T item)    
at System.Collections.ObjectModel.Collection`1.set_Item(Int32 index, T value)    
at System.Collections.ObjectModel.Collection`1.System.Collections.IList.set_Item(Int32 index, Object value)    
at Telerik.Windows.Data.VirtualQueryableCollectionView.LoadItems(Int32 startIndex, IEnumerable items)    
at Telerik.Windows.Data.VirtualQueryableCollectionView.<>c__DisplayClass26.<Load>b__25()
Chris
Top achievements
Rank 1
Iron
 answered on 27 Apr 2021
1 answer
48 views

Hi Telerik Team,

We have implemented data Virtualization on RadGridView using MVVM with inline edits same as your demo:http://demos.telerik.com/silverlight/#DataVirtualization/FirstLook.

when we edit a value and scroll down, we are getting an exception "Cannot change ObservableCollection during a CollectionChanged or PropertyChanged event." 

same happening at you demo page. I have attached the screen shot. 

please help us in fixing this issue ASAP.

 

Thanks,

Sai

Dilyan Traykov
Telerik team
 answered on 19 May 2016
3 answers
120 views
Hi, Are there any plans to extend the data virtualization functionality to work in RadAutocompleteBox?. I need some implementation to bind in this control 26 thousand items trying not freeze main thread.

Thanks in advance
Yana
Telerik team
 answered on 15 Mar 2016
1 answer
32 views

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>

 

Yoan
Telerik team
 answered on 03 Dec 2015
5 answers
129 views
Hi Telerik Team,

I'm using your new VirtualQueryableCollectionView (Q3 SP1 beta) with RadGridView for SL.
I notice that when the scrollbar's thumb is dragged the ItemsLoading callback is called twice.
When the PageDown key is hit or the scrollbar is clicked or the mouse wheel is actuated the ItemsLoading callback is called once as expected.
I set the grid's IsBusy=true at the beginning of the ItemsLoading callback and IsBusy=false just before it returns.
So when the thumb is dragged the grid is busy, then not busy and then busy again until the data appears.
Also the thumb action isn't smooth.

Thanks,
Eric


Dimitrina
Telerik team
 answered on 06 Jul 2015
1 answer
68 views

Hi,

We are using nested RadGridView in our application. 
While it works fine for few number of rows, the browser takes 600MB when there are 700 rows (20 columns) and hence it becomes very slow when the number of rows is large.
I have explicitly tried setting EnableRowVirtualization and EnableColumnVirtualization to True. Still, there seems to be no effect on the memory footprint.

The application is built using Silverlight 3.
Do I need to do anything else to make UI Virtualization work?

Regards,
Naveen

Dimitrina
Telerik team
 answered on 24 Jun 2014
1 answer
65 views
Hello, 

I have implement Data Virtualization in the RadGridView. But when load the application got the below exception and application get crash. I have attached the source code of the same. 

I want to know, how can I fix this problem.

Message: Unhandled Error in Silverlight Application 
Code: 4004    
Category: ManagedRuntimeError       Message: System.ServiceModel.DomainServices.Client.DomainOperationException: Load operation failed for query 'GetOrder_Details'. The remote server returned an error: NotFound. ---> System.ServiceModel.CommunicationException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound.
   at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
   at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClassa.<EndGetResponse>b__9(Object sendState)
   at System.Net.Browser.AsyncHelper.<>c__DisplayClass4.<BeginOnUI>b__0(Object sendState)
   --- End of inner exception stack trace ---
   at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
   at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)
   --- End of inner exception stack trace ---
   at System.ServiceModel.DomainServices.Client.WebDomainClient`1.EndQueryCore(IAsyncResult asyncResult)
   at System.ServiceModel.DomainServices.Client.DomainClient.EndQuery(IAsyncResult asyncResult)
   at System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult)
   --- End of inner exception stack trace ---
   at System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception error)
   at System.ServiceModel.DomainServices.Client.LoadOperation.Complete(Exception error)
   at System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult)
   at System.ServiceModel.DomainServices.Client.DomainContext.<>c__DisplayClass1b.<Load>b__17(Object )     
Line: 56
Char: 13
Code: 0
URI: http://localhost:3372/SilverlightApplication6TestPage.aspx 






































Dimitrina
Telerik team
 answered on 07 Feb 2014
1 answer
53 views
I'm using RadControls for Silverlight Q3 2013 SP1.
I'm using RadGridView with a VirtualQueryableCollectionView as its ItemSource.
Our Grid might have up to 10.000.000 rows.
I'm using MVVM.
I need to update the grid's selection from my view model and vice versa (currently done via 2-way binding).
I need to send the selection to the server and I need to update the selection from the server (VM exchanges according messages with server).
I need to support ExtendedSelection.

Problem: If the user selects the first row, scrolls to the bottom and shift-selects the last row, all items in between are fetched from the server. While this works, it's definitely not acceptable when the grid has 10.000.000 rows. My first thought was to have something like an "index selection" which tells the server that "row 1 to row 10.000.000" has been selected (ignoring that items in between might not be selected for the moment. And the same kind of "indexed selection" when the server needs to update the selection of the UI. So in this case we would not need to fetch 10.000.000 items nor send all 10.000.000 selected item IDs from UI to server or the other way round. However, I think there is no support for such an "indexed selection" in RadGridView. So how can I solve this problem???

I've read the post listed below but they didn't help me:
http://www.telerik.com/forums/extended-selection-with-radgridview-and-virtualization
http://www.telerik.com/forums/radgridview-virtualqueryablecollectionview-selected-items-shift-click
http://www.telerik.com/forums/radgridview-virtualqueryablecollectionview-selected-items

Hope to hear from you soon.
Dimitrina
Telerik team
 answered on 30 Jan 2014
1 answer
44 views
Hello Telerik,

I use a grid view as I mentioned in my previous forum thread.
I use a GridViewFilterDescriptor. The FilterDate of it is bound to a text box. So if I type something in the text box (which text is bound to the GridViewFilterDescriptor's FilterData property) the gridview gets filtered.
My question is that can I decide when the FilterData is too strict so the gridview will be empty?

Thank you for you reply in advance!
Best Regards,
Martin
Dimitrina
Telerik team
 answered on 18 Oct 2013
2 answers
41 views
Hello Telerik,

I have a gridview with a large number of objects in it. These objects have several properties and the grouping is done by the Category property. I'd really like to have a sorting inside every Category group but the sorting attribute shall be the Name. I've already found some old forum threads about this problem but according to them it was impossible with the old gridview.
My question is how can I achive this?

Best regards,
Martin
Martin
Top achievements
Rank 1
 answered on 16 Oct 2013
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?