This question is locked. New answers and comments are not allowed.
Hi, I use VirtualQueryableCollectionView
with RadGridView
and RIA Services. As ItemSource for RadGridView I used the following code:
When I set QuickSearchFilterDescriptor.Value then VirtualEventsList.Refresh()works fine. But when collection is filtered and VirtualEventsList.VirtualItemCount == 0 then VirtualEventsList.Refresh()is not working. This problem I resolved this way when I set QuickSearchFilterDescriptor.Value:
The problem is when I use the filter on Column in RadGridView. When collection returns 0 records and I change filter value, then Refresh is not working. Do you have any clues?
public
VirtualQueryableCollectionView VirtualEventsList
{
get
{
if
(_VirtualEventsList ==
null
)
{
_VirtualEventsList =
new
VirtualQueryableCollectionView() { LoadSize = 50, VirtualItemCount = 1 };
_VirtualEventsList.FilterDescriptors.Clear();
_VirtualEventsList.FilterDescriptors.Add(_QuickSearchFilterDescriptor);
_VirtualEventsList.ItemsLoading += (s, e) =>
{
EventListIsBusy =
true
;
var query = Context.GetEventsQuery(GetSelectedPositions());
var queryToLoad = query
.IncludeTotalCount(
true
)
.Sort(_VirtualEventsList.SortDescriptors)
.Where(_VirtualEventsList.FilterDescriptors)
.Skip(e.StartIndex)
.Take(e.ItemCount);
Context.Load<Event>(queryToLoad).Completed += (sender, args) =>
{
var lo = (LoadOperation)sender;
if
(lo.TotalEntityCount != -1 && lo.TotalEntityCount != _VirtualEventsList.VirtualItemCount)
{
_VirtualEventsList.VirtualItemCount = lo.TotalEntityCount;
}
_VirtualEventsList.Load(e.StartIndex, lo.Entities);
EventListIsBusy =
false
;
};
};
}
return
_VirtualEventsList;
}
}
When I set QuickSearchFilterDescriptor.Value then VirtualEventsList.Refresh()works fine. But when collection is filtered and VirtualEventsList.VirtualItemCount == 0 then VirtualEventsList.Refresh()is not working. This problem I resolved this way when I set QuickSearchFilterDescriptor.Value:
if
(_VirtualEventsList.VirtualItemCount == 0)
{
_VirtualEventsList.VirtualItemCount = 1;
}
_EventCategoryFilterDescriptor.Value = FilteringValue;
The problem is when I use the filter on Column in RadGridView. When collection returns 0 records and I change filter value, then Refresh is not working. Do you have any clues?