Given the code below, when the Grid is rendered, there is no filter icon on the column. Can you tell me what else I need to do to get the filter icon (therefore enabling filtering) to appear on a dynamic column.
Dim UDFCellStyle As Windows.Style = Me.FindResource("UDFCellViewStyle")
ForEach UDFItem InMe.CMXEvent.UDFItems
Dim UDFColumn AsNew Telerik.Windows.Controls.GridViewDataColumn
UDFColumn.CellStyle = UDFCellStyle
UDFColumn.HeaderText = UDFItem.UDF.Name
UDFColumn.IsFilterable = True
UDFColumn.DataContext = UDFItem
1 Answer, 1 is accepted
answered on 30 May 2009, 07:41 AM
You should set DataMemberBinding (or UniqueName) for the generated column in order to bind to a specific property of your data source element. If the specified property is a build-in type (like int, string, etc.) you will be able to filter right now. If your property is a custom object, you should implement IEquatable<> and IComparable<> interfaces in your object in order for the grid to be able to perform the operation.