This question is locked. New answers and comments are not allowed.
- I'm using SL5, MVVM and telerik ver: 2012.1.227.1050
- This is my xaml, it have RDPager, RGV , default will sort by column "Time" and just show Status contain "Error". User can clear this filter to view other items.
- App throw error when have both RadDataPager and FilterDescriptors, when I remove one of them app will work correctly.
<
telerik:RadDataPager
PageSize
=
"50"
Source
=
"{Binding Items, ElementName=GridView}"
DisplayMode
=
"FirstLastPreviousNextNumeric, Text"
IsTotalItemCountFixed
=
"True"
/>
<
telerik:RadGridView
x:Name
=
"GridView"
ItemsSource
=
"{Binding List}"
IsBusy
=
"{Binding IsBusy}"
IsReadOnly
=
"True"
AutoGenerateColumns
=
"False"
IsFilteringAllowed
=
"True"
ShowGroupPanel
=
"False"
EnableColumnVirtualization
=
"True"
EnableRowVirtualization
=
"True"
ShowColumnFooters
=
"False"
RowIndicatorVisibility
=
"Collapsed"
CanUserInsertRows
=
"False"
CanUserDeleteRows
=
"False"
CanUserReorderColumns
=
"False"
GridLinesVisibility
=
"Both"
FrozenColumnCount
=
"3"
>
<
telerik:RadGridView.SortDescriptors
>
<
telerik:SortDescriptor
Member
=
"Time"
SortDirection
=
"Descending"
/>
</
telerik:RadGridView.SortDescriptors
>
<
telerik:RadGridView.FilterDescriptors
>
<
telerik:FilterDescriptor
IsCaseSensitive
=
"True"
Member
=
"Status"
Operator
=
"Contains"
Value
=
"Error"
/>
</
telerik:RadGridView.FilterDescriptors
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Header
=
"Status"
DataMemberBinding
=
"{Binding Status}"
/>
<
telerik:GridViewDataColumn
/>.....
And my app throw this error
Message: Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError
Message: System.NullReferenceException: Object reference not set to an instance of an object.
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.Data.CompositeFilterDescriptorCollection.CreateFilterExpression(Expression instance)
at Telerik.Windows.Data.ICompositeFilterDescriptorExtensions.GetFilterFunction(ICompositeFilterDescriptor filterDescriptors, Type itemType)
at Telerik.Windows.Data.QueryableCollectionView.InitializeInternalList(IQueryable view)
at Telerik.Windows.Data.QueryableCollectionView.CreateInternalList()
at Telerik.Windows.Data.QueryableCollectionView.EnsureInternalList()
at Telerik.Windows.Data.QueryableCollectionView.get_InternalList()
at Telerik.Windows.Data.QueryableCollectionView.GetEnumerator()
at Telerik.Windows.Data.DataItemCollection.GetFlatEnumerator()
at Telerik.Windows.Data.DataItemCollection.GetEnumerator()
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.EnsureItems()
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)
Is there a way to use both of them?
Thank you in advance!
Phong