This question is locked. New answers and comments are not allowed.
This is just a sample of our code, the actual is more complex.
So I have my RadGridView binded to a collection of object Person.
Person class expose FirstName, LastName, and some other property.
As you can see, the 3rd column is not specify to bind to a property. So the 3rd column by default is binding to a Person object and is using its Person object's property to build a data template.
So here is the problem, even if I enabled IsFilterable = True for the 3rd column, the filter function (the filter icon that suppose to come up on the column header is not visable) is still won't enable. I think is because the binded object is not a value type.
Is there anything we can do to enable the filter for this column so I can use RadGridView's Filter functionality? I understand there is maybe a need to write our own filter algorithm against this Person object, but how to do it in RadGridView?
So I have my RadGridView binded to a collection of object Person.
Person class expose FirstName, LastName, and some other property.
<
telerik:RadGridView
SelectedItem
=
"{Binding CurrentSelectedTreeItem}"
x:Name
=
"MyRadDataGrid"
AutoGenerateColumns
=
"False"
ItemsSource
=
"{Binding PersonCollection}"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding FirstName}"
SortMemberPath
=
"ID"
Header
=
"My Frist Name"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding LastName}"
Header
=
"My Last Name"
/>
<
telerik:GridViewDataColumn
Header
=
"My Last Name"
IsFilterable
=
"True"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
Button
Content
=
"{Binding SomeObject.AnotherProperty}"
/>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
As you can see, the 3rd column is not specify to bind to a property. So the 3rd column by default is binding to a Person object and is using its Person object's property to build a data template.
So here is the problem, even if I enabled IsFilterable = True for the 3rd column, the filter function (the filter icon that suppose to come up on the column header is not visable) is still won't enable. I think is because the binded object is not a value type.
Is there anything we can do to enable the filter for this column so I can use RadGridView's Filter functionality? I understand there is maybe a need to write our own filter algorithm against this Person object, but how to do it in RadGridView?