Dear Support,
I try to use filtering but in distinct value area the values are not appear.
Any idea why?
Here is my xaml code:
<
telerikGridView:RadGridView
Grid.Row
=
"1"
Margin
=
"5"
x:Name
=
"SearchGrid"
AutoGenerateColumns
=
"False"
ItemsSource
=
"{Binding Path=ValuesOfQuestions, Mode=OneWay}"
DistinctValuesLoading
=
"SearchGrid_DistinctValuesLoading"
IsReadOnly
=
"True"
IsFilteringAllowed
=
"True"
ShowGroupPanel
=
"False"
ShowColumnFooters
=
"False"
ShowColumnSortIndexes
=
"True"
>
<
telerikGridView:RadGridView.Columns
>
<
telerikGridView:GridViewDataColumn
x:Name
=
"ID"
Header
=
"ID"
ShowDistinctFilters
=
"True"
DataMemberBinding
=
"{Binding Path=ID}"
/>
<
telerikGridView:GridViewDataColumn
x:Name
=
"Date"
Header
=
"Date"
DataMemberBinding
=
"{Binding Path=Date}"
/>
<
telerikGridView:GridViewDataColumn
x:Name
=
"Value"
Header
=
"Value"
DataMemberBinding
=
"{Binding Path=Value}"
/>
</
telerikGridView:RadGridView.Columns
>
</
telerikGridView:RadGridView
>
XAML code behind:
private
void
SearchGrid_DistinctValuesLoading(
object
sender, GridViewDistinctValuesLoadingEventArgs e)
{
e.ItemsSource = ((Telerik.Windows.Controls.RadGridView)sender).GetDistinctValues(e.Column,
false
);
}
C# code:
public
class
ValuesOfQuestion
{
public
int
ID {
get
;
set
; }
public
string
Value {
get
;
set
; }
public
DateTime Date {
get
;
set
; }
}
ValuesOfQuestions =
new
ObservableCollection<ValuesOfQuestion>();
for
(
int
i = 0; i < 10; i++)
{
ValuesOfQuestions.Add(
new
ValuesOfQuestion { ID = i, Date = DateTime.Now, Value =
"Value "
+ i.ToString() });
}
And I attached a picture for my problem.
Thanks,
Robert.