Studio for Silverlight

NumericValue Filter not working with null column values

  •  sunmuk said 1 year ago:

    The numeric value filter in grid is not able to filter when the column data is having some null values. I dont want to convert the value to a default number as I want to show nothing in the column for those data values.

  •  C1_Deepankar10p said 1 year ago:

    I could see the behavior as you have mentioned. Similar issue has been reported
    recently which has already been forwarded to the developer. Once we receive any
    update, I will inform you the solution.

    As of now, you may try handling the behavior manually as per your requirement. Please see
    the suggested code below.

    Private Sub c1DataGrid1_FilterChanging(sender As Object, e As C1.Silverlight.DataGrid.DataGridFilterChangingEventArgs) Handles c1DataGrid1.FilterChanging
    
            If e.ChangingColumns.Count > 0 Then
                If Double.IsNaN(DirectCast(e.ChangingColumns(0).Value.FilterInfo(0).Value, Double)) Then
                    e.ChangingColumns(0).Value.FilterInfo(0).Value = String.Empty
                    e.ChangingColumns(0).Value.FilterInfo(0).FilterType = DataGridFilterType.Text
                End If
            End If
    
    End Sub
    
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.