<Window x:Class="Test.MainWindow" Title="MainWindow" Height="250" Width="495" xmlns:TelerikChart="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting" xmlns:TelerikCharting="clr-namespace:Telerik.Windows.Controls.Charting;assembly=Telerik.Windows.Controls.Charting"> <Grid> <TelerikChart:RadChart x:Name="m_RadChart" /> </Grid></Window>using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;using System.Windows.Input;using System.Windows.Media;using System.Windows.Media.Imaging;using System.Windows.Navigation;using System.Windows.Shapes;using Telerik.Windows.Controls.Charting;using Telerik.Windows.Controls;namespace Test{ // Data model. public class ChartRecord { public string Legend { get; set; } public int Value { get; set; } } public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); // Create data source. List<ChartRecord> source = new List<ChartRecord>(); source.Add(new ChartRecord() { Legend = "Foo", Value = 50 }); source.Add(new ChartRecord() { Legend = "Bar", Value = 30 }); source.Add(new ChartRecord() { Legend = "Baz", Value = 20 }); m_RadChart.ItemsSource = source; m_RadChart.DefaultView.ChartArea.SmartLabelsEnabled = true; PieSeriesDefinition definition = new PieSeriesDefinition(); // Setup label settings. RadialLabelSettings labelSettings = new RadialLabelSettings(); labelSettings.SpiderModeEnabled = true; labelSettings.ShowConnectors = true; definition.LabelSettings = labelSettings; // Setup mappings. SeriesMapping seriesMapping = new SeriesMapping(); seriesMapping.SeriesDefinition = definition; seriesMapping.ItemMappings.Add(new ItemMapping("Value", DataPointMember.YValue)); seriesMapping.ItemMappings.Add(new ItemMapping("Legend", DataPointMember.XCategory)); m_RadChart.SeriesMappings.Add(seriesMapping); } }}<telerik:GridViewComboBoxColumn Header="Product" Width="2*" DataMemberBinding="{Binding Product}" DisplayMemberPath="FullDescription" ItemsSource="{Binding Products}"/>private void playersGrid_Sorting(object sender, GridViewSortingEventArgs e) { if (e.NewSortingState == SortingState.None) { this.playersGrid.SortDescriptors.Clear(); SortDescriptor descriptor = new SortDescriptor(); descriptor.Member = "Name"; descriptor.SortDirection = System.ComponentModel.ListSortDirection.Ascending; //ColumnSortDescriptor csd = new ColumnSortDescriptor(); //Telerik.Windows.Controls.GridView.ColumnSortDescriptor csd = new Telerik.Windows.Controls.GridView.ColumnSortDescriptor(); //csd.Column = this.playersGrid.Columns[0]; //csd.SortDirection = System.ComponentModel.ListSortDirection.Ascending; this.playersGrid.SortDescriptors.Add(descriptor); } }
We seem to have a problem getting filtering working correctly.
The behaviour we are seeing in our application is demonstrable in the demo.
Steps to reproduce:-
1. Run WPF Demos
2. Select TreeListView from All Controls
3. In the Name column select the filter
4. Set “Show rows with a value that” to Starts with
5. Type in “set” and then apply the filter, all works as expected
6. Clear the filter
7. Type in “get” and then apply the filter. Nothing happens; the previous filter based on “set” is applied.
To summarise we seem to be able to set a filter only once, after that you need to close the app to clear the filer.
Apologies if this has been reported before and been fixed in a later build than we are using (Q2 2011 SP1 – 2011.2.920.35)
Regards
John