This question is locked. New answers and comments are not allowed.
Hello , I use the grid view filteringmode ="FilterRow".
and my database object return a column type is Nullable<datetime>.
When I filter this column is null or is not null .
Till now, everything is fine, but, when I start scroll the gridview, throw the blow exception. I think the exception is came from FilterDistinctValues, so, when I use the FilterRow mode, I do not need column distinct values, Can I overwrite or set property do not call GetDistinctValue ?
System.InvalidOperationException: The binary operator NotEqual is not defined for the types 'System.Nullable`1[System.DateTime]' and 'System.Object'.
at System.Linq.Expressions.Expression.GetEqualityComparisonOperator(ExpressionType binaryType, String opName, Expression left, Expression right, Boolean liftToNull)
at System.Linq.Expressions.Expression.NotEqual(Expression left, Expression right)
at Telerik.Windows.Data.Expressions.FilterOperatorExpressionBuilderBase.GenerateIsNotNull(Expression left)
at Telerik.Windows.Data.Expressions.FilterOperatorExpressionBuilderBase.CreateExpression(Expression left, Expression right)
at Telerik.Windows.Data.Expressions.OperatorValueFilterDescriptorExpressionBuilderBase.CreateBodyExpression()
at Telerik.Windows.Data.FilterDescriptor.CreateFilterExpression(ParameterExpression parameterExpression)
at Telerik.Windows.Data.FilterDescriptorBase.CreateFilterExpression(Expression instance)
at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpression()
at Telerik.Windows.Data.CompositeFilterDescriptor.CreateFilterExpression(ParameterExpression parameterExpression)
at Telerik.Windows.Data.FilterDescriptorBase.CreateFilterExpression(Expression instance)
at Telerik.Windows.Controls.GridView.FieldFilterDescriptor.Telerik.Windows.Data.IFilterDescriptor.CreateFilterExpression(Expression instance)
at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpression()
at Telerik.Windows.Data.CompositeFilterDescriptor.CreateFilterExpression(ParameterExpression parameterExpression)
at Telerik.Windows.Data.FilterDescriptorBase.CreateFilterExpression(Expression instance)
at Telerik.Windows.Controls.GridView.ColumnFilterDescriptor.CreateFilterExpression(Expression instance)
at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpression()
at Telerik.Windows.Data.Expressions.FilterExpressionBuilder.CreateFilterExpression()
at Telerik.Windows.Data.QueryableExtensions.Where(IQueryable source, CompositeFilterDescriptorCollection filterDescriptors)
at Telerik.Windows.Data.QueryableExtensions.Where(IQueryable source, IEnumerable`1 filterDescriptors)
at Telerik.Windows.Data.QueryableExtensions.Where(IQueryable source, FilterDescriptorCollection filterDescriptors)
at Telerik.Windows.Controls.GridViewColumn.FilterDistinctValues(IQueryable source)
at Telerik.Windows.Controls.GridViewColumn.GetDistinctValuesQuery(IQueryable source, Boolean filter, Nullable`1 maximumValueCount)
at Telerik.Windows.Controls.GridViewColumn.GetDistinctValuesCore(IQueryable queryableSource, Boolean filter, Nullable`1 maximumValueCount)
at Telerik.Windows.Controls.GridView.GridViewDataControl.GetDistinctValues(GridViewColumn column, Boolean filter, Nullable`1 maximumValueCount)
at Telerik.Windows.Controls.GridView.GridViewDataControl.GetDistinctValues(GridViewColumn column, Boolean filter)
at Telerik.Windows.Controls.GridView.FieldFilterControl.RefreshContent()
at Telerik.Windows.Controls.GridView.FieldFilterControl.set_Column(GridViewColumn value)
at Telerik.Windows.Controls.GridView.GridViewHeaderCell.RefreshFiltering()
at Telerik.Windows.Controls.GridView.GridViewHeaderCell.OnColumnChanged(GridViewColumn oldColumn, GridViewColumn newColumn)
at Telerik.Windows.Controls.GridView.GridViewCellBase.set_Column(GridViewColumn value)
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.PrepareCell(GridViewCellBase cell, GridViewColumn column)
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.GetVirtualizedCell(GridViewColumn column, Boolean createIfNull)
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.RealizeAndMeasureCells(Int32 startIndex, Int32 predictedLastIndex, Func`2 calculateNext
and my database object return a column type is Nullable<datetime>.
When I filter this column is null or is not null .
Till now, everything is fine, but, when I start scroll the gridview, throw the blow exception. I think the exception is came from FilterDistinctValues, so, when I use the FilterRow mode, I do not need column distinct values, Can I overwrite or set property do not call GetDistinctValue ?
System.InvalidOperationException: The binary operator NotEqual is not defined for the types 'System.Nullable`1[System.DateTime]' and 'System.Object'.
at System.Linq.Expressions.Expression.GetEqualityComparisonOperator(ExpressionType binaryType, String opName, Expression left, Expression right, Boolean liftToNull)
at System.Linq.Expressions.Expression.NotEqual(Expression left, Expression right)
at Telerik.Windows.Data.Expressions.FilterOperatorExpressionBuilderBase.GenerateIsNotNull(Expression left)
at Telerik.Windows.Data.Expressions.FilterOperatorExpressionBuilderBase.CreateExpression(Expression left, Expression right)
at Telerik.Windows.Data.Expressions.OperatorValueFilterDescriptorExpressionBuilderBase.CreateBodyExpression()
at Telerik.Windows.Data.FilterDescriptor.CreateFilterExpression(ParameterExpression parameterExpression)
at Telerik.Windows.Data.FilterDescriptorBase.CreateFilterExpression(Expression instance)
at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpression()
at Telerik.Windows.Data.CompositeFilterDescriptor.CreateFilterExpression(ParameterExpression parameterExpression)
at Telerik.Windows.Data.FilterDescriptorBase.CreateFilterExpression(Expression instance)
at Telerik.Windows.Controls.GridView.FieldFilterDescriptor.Telerik.Windows.Data.IFilterDescriptor.CreateFilterExpression(Expression instance)
at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpression()
at Telerik.Windows.Data.CompositeFilterDescriptor.CreateFilterExpression(ParameterExpression parameterExpression)
at Telerik.Windows.Data.FilterDescriptorBase.CreateFilterExpression(Expression instance)
at Telerik.Windows.Controls.GridView.ColumnFilterDescriptor.CreateFilterExpression(Expression instance)
at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpression()
at Telerik.Windows.Data.Expressions.FilterExpressionBuilder.CreateFilterExpression()
at Telerik.Windows.Data.QueryableExtensions.Where(IQueryable source, CompositeFilterDescriptorCollection filterDescriptors)
at Telerik.Windows.Data.QueryableExtensions.Where(IQueryable source, IEnumerable`1 filterDescriptors)
at Telerik.Windows.Data.QueryableExtensions.Where(IQueryable source, FilterDescriptorCollection filterDescriptors)
at Telerik.Windows.Controls.GridViewColumn.FilterDistinctValues(IQueryable source)
at Telerik.Windows.Controls.GridViewColumn.GetDistinctValuesQuery(IQueryable source, Boolean filter, Nullable`1 maximumValueCount)
at Telerik.Windows.Controls.GridViewColumn.GetDistinctValuesCore(IQueryable queryableSource, Boolean filter, Nullable`1 maximumValueCount)
at Telerik.Windows.Controls.GridView.GridViewDataControl.GetDistinctValues(GridViewColumn column, Boolean filter, Nullable`1 maximumValueCount)
at Telerik.Windows.Controls.GridView.GridViewDataControl.GetDistinctValues(GridViewColumn column, Boolean filter)
at Telerik.Windows.Controls.GridView.FieldFilterControl.RefreshContent()
at Telerik.Windows.Controls.GridView.FieldFilterControl.set_Column(GridViewColumn value)
at Telerik.Windows.Controls.GridView.GridViewHeaderCell.RefreshFiltering()
at Telerik.Windows.Controls.GridView.GridViewHeaderCell.OnColumnChanged(GridViewColumn oldColumn, GridViewColumn newColumn)
at Telerik.Windows.Controls.GridView.GridViewCellBase.set_Column(GridViewColumn value)
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.PrepareCell(GridViewCellBase cell, GridViewColumn column)
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.GetVirtualizedCell(GridViewColumn column, Boolean createIfNull)
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.RealizeAndMeasureCells(Int32 startIndex, Int32 predictedLastIndex, Func`2 calculateNext