Anyone know of C# code examples that show a RadDataFilter, RadGridView, and RadDataForm all using the same "Source"?
Something like this?
IEnumerable<MyClass> SomeResults;
SomeResults = GetResults();
MyDataForm.ItemsSource = SomeResults
MyDataFilter.Source = SomeResults;
MyGridView.ItemsSource = SomeResults;
I know in xaml you can do something like this for the grid
{Binding FilteredSource, ElementName=MyDataFilter}
but I have no idea how to pull this off in C# code.
When I scroll my grid, the Dataform does not move. When I select next in my dataform, the Grid selection does not move, and when I apply a filter, nothing gets filtered.
This setup (Filter, Grid, dataform) will be used to display items from multiple sources, therefore I have to do it all in code.
Thanks for any help.
Jeff
currentParagraph.Parent.Children.AddAfter(currentParagraph, newPargraph);xaml = new XamlFormatProvider().Export(richtextbox.Document);public MainWindow(){ InitializeComponent(); this.radGridView1.ItemsSource = GenerateProducts(); this.radGridView2.ItemsSource = GenerateProducts(); MessageBox.Show(radGridView1.Items.Count.ToString()); MessageBox.Show(radGridView2.Items.Count.ToString());}<UserControl.Resources> <BooleanToVisibilityConverter x:Key="booleanConverter" /> <selectors:MenuItemTemplateSelector x:Key="templateSelector"></selectors:MenuItemTemplateSelector> <HierarchicalDataTemplate x:Key="MenuItemTemplate" ItemsSource="{Binding Items}"> <TextBlock Text="{Binding Text}" cal:Action.TargetWithoutContext="{Binding}" Visibility="{Binding IsVisible,Mode=TwoWay,Converter={StaticResource booleanConverter}}" /> </HierarchicalDataTemplate> </UserControl.Resources> <Grid> <telerik:RadMenu x:Name="MenuList" ClickToOpen="False" BorderBrush="Transparent" ItemsSource="{Binding Items}" ItemTemplate="{StaticResource MenuItemTemplate}" cal:Message.Attach="[Event ItemClick] = [Action OpenView($eventArgs)]" > <telerik:RadMenu.ItemContainerStyle> <Style TargetType="telerik:RadMenuItem"> <Setter Property="IsSeparator" Value="{Binding IsSeparator}" /> <Setter Property="IsChecked" Value="{Binding IsChecked, Mode=TwoWay}" /> <Setter Property="IsCheckable" Value="{Binding IsCheckable}" /> <Setter Property="StaysOpenOnClick" Value="{Binding IsCheckable}" /> </Style> </telerik:RadMenu.ItemContainerStyle> </telerik:RadMenu> </Grid></UserControl>