I've just downloaded the UI for WPF Q2 2016. I'm trying to use the Search as you type feature, but it's throwing exceptions.
My XAML looks as follows:
<
telerik:RadGridView
ItemsSource
=
"{Binding Table}"
AutoGenerateColumns
=
"True"
></
telerik:RadGridView
>
And my ViewModel:
public
class
TestViewModel : INotifyPropertyChanged
{
private
DataTable _table;
public
event
PropertyChangedEventHandler PropertyChanged;
public
TestViewModel()
{
var table =
new
DataTable();
table.Columns.Add(
"StringValue"
,
typeof
(
string
));
for
(
int
i = 0; i < 100; i++)
{
table.Rows.Add($
"String Value {i}"
);
}
Table = table;
}
public
DataTable Table
{
get
{
return
_table; }
set
{
_table = value;
OnPropertyChanged(nameof(Table));
OnPropertyChanged(nameof(View));
}
}
public
DataView View {
get
{
return
Table.DefaultView; } }
protected
virtual
void
OnPropertyChanged(
string
propertyName =
null
)
{
PropertyChanged?.Invoke(
this
,
new
PropertyChangedEventArgs(propertyName));
}
}
When thrying to search as you type I get an ArgumentException with message: "Column '[StringValue]' does not belong to table".
I've tried binding to the Table as well as the DefaultView of the table, but the results are the same.