Hi,
I am using telerik controls for silverlight 4 internal build 2010.3.1331.
I get my data via WCF RIA Services.
I filter the contents of a RADDomainDatasource via a CompositeFilterDescriptor:
CompositeFilterDescriptor compositeDescriptor = new CompositeFilterDescriptor();
compositeDescriptor.LogicalOperator = FilterCompositionLogicalOperator.Or;
if (ArticleDomain.FilterDescriptors != null) ArticleDomain.FilterDescriptors.Clear();
if (ArticleDomain.FilterDescriptors != null)
{
compositeDescriptor.FilterDescriptors.Add(new FilterDescriptor("Caption", FilterOperator.Contains, text));
compositeDescriptor.FilterDescriptors.Add(new FilterDescriptor("Comment", FilterOperator.Contains, text));
compositeDescriptor.FilterDescriptors.Add(new FilterDescriptor("EAN", FilterOperator.Contains, text));
compositeDescriptor.FilterDescriptors.Add(new FilterDescriptor("ShortCaption", FilterOperator.Contains, text));
compositeDescriptor.FilterDescriptors.Add(new FilterDescriptor("Number", FilterOperator.Contains, text));
}
if (ArticleDomain.FilterDescriptors != null) ArticleDomain.FilterDescriptors.Add(compositeDescriptor);
I populate my RadDomainDataSource ArticleDomain via the Load command. So far everything works fine.
MainGridView.ItemsSource = ArticleDomain.DataView;Here I connect my RadGridView with the DataView of the ArticleDomain.
When I do this and filter the ArticleDomain, in the RadGridView I get to see only the filtered entires, which is correct.
Now I added two navigation symbols to my form which allow the user to navigate to the next or the previous entry in the RadGridView.
Here is the code for the navigation to the next entry arrow:
if (ArticleDataSource.DataView.CurrentPosition < ArticleDataSource.DataView.Count - 1)
ArticleDataSource.DataView.MoveCurrentToNext();
But this code does not navigate through the entries visible in the MainGrid! When I start navigating to the next entry using the code mentioned above, the RadDomainDataSource navigates through the UNFILTERED COLLECTION containing about 900 entries and not through the filtered entries which
are displayed in the MainGridView.
I attached an image showing the problem.
In this image I filtered my original RadDomainDataSource and I get 5 results, the unfiltered size was about 900 entries.
The GridView shows correctly the filtered 5 entries sorted by the column ArtNr.
When I click 4 times the "navigate next" button on top of my form, I land on ArtNr = 0003333, which is correct.
The next time I press the "navigate next" button I would expect to land on the fifth row containing ArtNr 0008a.
But I don't. Instead the orange row selector disapperars and I land internally on ArtNr 00004, which is not in the filtered list.
To me this is either a bug or I am doing something horribly wrong :-(
Janni