_compositeFilterDesriptor.CreateFilterExpression(parameterExpression);
In example:
Filter value is: "dasdasddasdasd"
Expression is: (stringColumn1 contains dasdasddasdasd) OR (stringColumn2 contains dasdasddasdasd) OR (dateTimeColumn IsEqual 01-01-0000) OR (decimalColumn1 IsEqual 0) OR (decimalColumn2 IsEqual 0)
I am using the RadGridView and RadDataPager in a WPF application. I have a method that pulls pages of Employees from a database (or some other data source). There are more Employees than I want to put in memory at one time, so I need to page the data retrieved from the database.
So, I have a method that returns pages of data in the form of IEnumerable<Employee>. Each IEnumerable<Employee> is one page of data. The xaml is set up this way:
<Grid>
...
<telerik:RadGridView ItemsSource="{Binding PagedSource, ElementName=radDataPager}"
Horizontal Alignment="Left"
AutoGenerateColumns="False"
x:Name="radGridView1"
VerticalAlignment="Top"
Height="Auto"
Width="Auto"
Grid.Row="0">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding FirstName}"
Header="First Name"
UniqueName="FirstName" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding LastName}"
Header="Last Name"
UniqueName="LastName" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Age}"
Header="How Old?"
UniqueName="Age" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>
<telerik:RadDataPager x:Name="radDataPager"
Source="{Binding Employees2}"
DisplayMode="FirstLastPreviousNext"
IsTotalItemCountFixed="False"
PageSize="3"
Grid.Row="1"
Margin="0,9,0,0"
PageIndexChanging="radDataPager_PageIndexChanging"
PageIndexChanged="radDataPager_PageIndexChanged"/>
</Grid>
I only get the first page with 3 records. Can this be fixed, or am I trying to do something that these controls do not support?
What would be a better way to do what I am trying to do?
Thanks.
David
Hello.
I'm try host GridView WPF in WinForms App...
private void GridLoad() { Telerik.Windows.Controls.RadGridView wpfGrid = new Telerik.Windows.Controls.RadGridView(); wpfGrid.Name = "myGrid"; wpfGrid.Height = 641; wpfGrid.ItemsSource = phpmyadminDataSet; wpfGrid.AutoGenerateColumns = true; ElementHost elementHost = new ElementHost(); elementHost.Dock = DockStyle.None; elementHost.Width = 640; elementHost.Height = 120; elementHost.Child = wpfGrid; panel1.Controls.Add(elementHost); }When app starting Grid is clear. When I'm apply filter or sorting, data loading.
I'm try wpfGrid.Rebind(). No effect...

System.Windows.Data Error: 25 : Both 'ContentTemplate' and 'ContentTemplateSelector' are set; 'ContentTemplateSelector' will be ignored. ContentPresenter:'ContentPresenter' (Name='')
Why PropertyGrid generate excess properties, when AutoGeneratePropertyDefinitions is set to false?
<Window x:Class="PropertyGridTester.MainWindow" xmlns:PropertyGridTester="clr-namespace:PropertyGridTester" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Title="MainWindow" Height="350" Width="525" mc:Ignorable="d" d:DataContext="{d:DesignInstance {x:Type PropertyGridTester:MainWindowViewModel}}"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <StackPanel Grid.Column="0"> <RadioButton Command="{Binding SetFirstClass}">Set first class</RadioButton> <RadioButton Command="{Binding SetSecondClass}">Set second class</RadioButton> <RadioButton Command="{Binding SetNull}" IsChecked="True">Set null</RadioButton> </StackPanel> <ContentControl Grid.Column="1" DataContext="{Binding SelectedClass}" Content="{Binding}"> <ContentControl.Resources> <DataTemplate DataType="{x:Type PropertyGridTester:FirstClass}"> <telerik:RadPropertyGrid Item="{Binding}" AutoGeneratePropertyDefinitions="False" HorizontalAlignment="Stretch" SearchBoxVisibility="Collapsed" SortAndGroupButtonsVisibility="Collapsed" DescriptionPanelVisibility="Collapsed" HorizontalContentAlignment="Stretch" LabelColumnWidth="110"> <telerik:RadPropertyGrid.PropertyDefinitions> <telerik:PropertyDefinition Binding="{Binding Visible}" DisplayName="First class visible"> <telerik:PropertyDefinition.EditorTemplate> <DataTemplate> <TextBox Text="{Binding Visible}" /> </DataTemplate> </telerik:PropertyDefinition.EditorTemplate> </telerik:PropertyDefinition> </telerik:RadPropertyGrid.PropertyDefinitions> </telerik:RadPropertyGrid> </DataTemplate> <DataTemplate DataType="{x:Type PropertyGridTester:SecondClass}"> <telerik:RadPropertyGrid Item="{Binding}" AutoGeneratePropertyDefinitions="False" HorizontalAlignment="Stretch" SearchBoxVisibility="Collapsed" SortAndGroupButtonsVisibility="Collapsed" DescriptionPanelVisibility="Collapsed" HorizontalContentAlignment="Stretch" LabelColumnWidth="110"> <telerik:RadPropertyGrid.PropertyDefinitions> <telerik:PropertyDefinition Binding="{Binding Visible}" DisplayName="Second class visible"> <telerik:PropertyDefinition.EditorTemplate> <DataTemplate> <TextBox Text="{Binding Visible}" /> </DataTemplate> </telerik:PropertyDefinition.EditorTemplate> </telerik:PropertyDefinition> </telerik:RadPropertyGrid.PropertyDefinitions> </telerik:RadPropertyGrid> </DataTemplate> </ContentControl.Resources> </ContentControl> </Grid> </Window>
using System; using System.Windows.Input; using Microsoft.Practices.Prism.Commands; using Microsoft.Practices.Prism.ViewModel; namespace PropertyGridTester { public abstract class BaseClass : NotificationObject { private string _Visible = String.Empty; public string Visible { get { return _Visible; } set { if (_Visible == value) return; _Visible = value; RaisePropertyChanged(() => Visible); } } private string _NotVisible = String.Empty; public string NotVisible { get { return _NotVisible; } set { if (_NotVisible == value) return; _NotVisible = value; RaisePropertyChanged(() => NotVisible); } } } public class FirstClass : BaseClass { } public class SecondClass : BaseClass { } public class MainWindowViewModel : NotificationObject { public MainWindowViewModel() { SetFirstClass = new DelegateCommand(() => SelectedClass = new FirstClass()); SetSecondClass = new DelegateCommand(() => SelectedClass = new SecondClass()); SetNull = new DelegateCommand(() => SelectedClass = null); } public ICommand SetFirstClass { get; private set; } public ICommand SetSecondClass { get; private set; } public ICommand SetNull { get; private set; } private BaseClass _SelectedClass = null; public BaseClass SelectedClass { get { return _SelectedClass; } set { if (_SelectedClass == value) return; _SelectedClass = value; RaisePropertyChanged(() => SelectedClass); } } } }