Completed
Last Updated: 19 Jun 2017 12:18 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 05 Apr 2017 07:45
Category: GridView
Type: Bug Report
2
FIX. RadGridView - InvalidCastException when using the CompositeDataFilterForm and applying a filter for a nullable DateTime column
Workaround:

AddHandler Me.RadGridView1.CreateCompositeFilterDialog, AddressOf CreateCompositeFilterDialog

Private Sub CreateCompositeFilterDialog(sender As Object, e As GridViewCreateCompositeFilterDialogEventArgs)
    Dim dialog As New CompositeDataFilterForm()
    AddHandler dialog.DataFilter.EditorRequired, AddressOf EditorRequired
    e.Dialog = dialog
End Sub

Private Sub EditorRequired(sender As Object, e As TreeNodeEditorRequiredEventArgs)
    Dim filterNode As DataFilterCriteriaNode = TryCast(e.Node, DataFilterCriteriaNode)
    If filterNode IsNot Nothing AndAlso filterNode.PropertyName = "BASE_NULL_DATE" AndAlso TypeOf sender Is DataFilterValueEditorElement Then
        e.Editor = New TreeViewDateTimeEditor()
    End If
End Sub
0 comments