I am using GridView for Winforms and the data is bound using a dataset. One of the columns in the dataset's table is an integer column. I have enabled Filter's for this column in GridView and this shows up as a funnel. When I right click on the funnel, there is a context menu with all the filtering options (No filter,Equals,Not Equals etc). When I click on the "Between" menu item in this context menu, the application crashes with the System.Argument exception {"Not enough values."}. The complete stack trace below.
How can we fix this behaviour, Is there any way to programatically disable some of the menu items.
Stack Trace:
at Telerik.WinControls.UI.Code.Data.Filtering.FilterFunction.CheckParameters(Object[] values)
at Telerik.WinControls.UI.Code.Data.Filtering.FilterFunction.GetFunctionString(String fieldName, Object[] values)
at Telerik.WinControls.Data.FilterExpression.AppendPredicateString(StringBuilder result, FilterPredicate predicate, String format)
at Telerik.WinControls.Data.FilterExpression.ToString()
at Telerik.WinControls.Data.FilterExpressionCollection.ToString()
at Telerik.WinControls.Data.DataAccessComponent.Telerik.WinControls.Data.ExpressionHelper.IExpressionChangeNotificationConsumer.FilterExpressionChanged()
at Telerik.WinControls.Data.ExpressionHelper.FilterExpressionsChanged(Object sender, NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.ExpressionFieldCollection`1.NotifyListenersCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.ItemObservableCollection`1.OnItemPropertyChanged(Object sender, EventArgs e)
at Telerik.WinControls.Data.NotifyPropertyBase.SignalPropertyChanged()
at Telerik.WinControls.Data.NotifyPropertyBase.OnPropertyChanged(PropertyChangedEventArgs e)
at Telerik.WinControls.Data.FilterExpression.OnPropertyChanged(PropertyChangedEventArgs e)
at Telerik.WinControls.Data.FilterExpression.Predicates_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.ObservableCollection`1.NotifyListenersCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.ExpressionFieldCollection`1.NotifyListenersCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.ItemObservableCollection`1.OnItemPropertyChanged(Object sender, EventArgs e)
at Telerik.WinControls.Data.NotifyPropertyBase.SignalPropertyChanged()
at Telerik.WinControls.Data.NotifyPropertyBase.OnPropertyChanged(PropertyChangedEventArgs e)
at Telerik.WinControls.Data.NotifyPropertyBase.SetProperty[T](String propertyName, T& propertyField, T value)
at Telerik.WinControls.Data.FilterPredicate.set_Function(GridKnownFunction value)
at Telerik.WinControls.UI.GridFilterCellElement.ChangeFilter(RadGridFilterFunctionMenuItem menuItem)
at Telerik.WinControls.UI.GridFilterCellElement.FilterFunctionButton.item_Click(Object sender, EventArgs e)
at Telerik.WinControls.RadItem.OnClick(EventArgs e)
at Telerik.WinControls.UI.RadButtonItem.OnClick(EventArgs e)
at Telerik.WinControls.UI.RadMenuItemBase.OnClick(EventArgs e)
at Telerik.WinControls.UI.RadMenuItem.OnClick(EventArgs e)
at Telerik.WinControls.RadItem.DoClick(EventArgs e)
at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.DoMouseUp(MouseEventArgs e)
at Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.RadControl.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at Telerik.WinControls.RadControl.WndProc(Message& m)
at Telerik.WinControls.UI.RadPopupControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Microsoft.AdCenter.CommunityPlatform.UI.Desktop.Program.Main() in d:\CpDev\private\src\UI\Desktop\Program.cs:line 17
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
How can we fix this behaviour, Is there any way to programatically disable some of the menu items.
Stack Trace:
at Telerik.WinControls.UI.Code.Data.Filtering.FilterFunction.CheckParameters(Object[] values)
at Telerik.WinControls.UI.Code.Data.Filtering.FilterFunction.GetFunctionString(String fieldName, Object[] values)
at Telerik.WinControls.Data.FilterExpression.AppendPredicateString(StringBuilder result, FilterPredicate predicate, String format)
at Telerik.WinControls.Data.FilterExpression.ToString()
at Telerik.WinControls.Data.FilterExpressionCollection.ToString()
at Telerik.WinControls.Data.DataAccessComponent.Telerik.WinControls.Data.ExpressionHelper.IExpressionChangeNotificationConsumer.FilterExpressionChanged()
at Telerik.WinControls.Data.ExpressionHelper.FilterExpressionsChanged(Object sender, NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.ExpressionFieldCollection`1.NotifyListenersCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.ItemObservableCollection`1.OnItemPropertyChanged(Object sender, EventArgs e)
at Telerik.WinControls.Data.NotifyPropertyBase.SignalPropertyChanged()
at Telerik.WinControls.Data.NotifyPropertyBase.OnPropertyChanged(PropertyChangedEventArgs e)
at Telerik.WinControls.Data.FilterExpression.OnPropertyChanged(PropertyChangedEventArgs e)
at Telerik.WinControls.Data.FilterExpression.Predicates_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.ObservableCollection`1.NotifyListenersCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.ExpressionFieldCollection`1.NotifyListenersCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.ItemObservableCollection`1.OnItemPropertyChanged(Object sender, EventArgs e)
at Telerik.WinControls.Data.NotifyPropertyBase.SignalPropertyChanged()
at Telerik.WinControls.Data.NotifyPropertyBase.OnPropertyChanged(PropertyChangedEventArgs e)
at Telerik.WinControls.Data.NotifyPropertyBase.SetProperty[T](String propertyName, T& propertyField, T value)
at Telerik.WinControls.Data.FilterPredicate.set_Function(GridKnownFunction value)
at Telerik.WinControls.UI.GridFilterCellElement.ChangeFilter(RadGridFilterFunctionMenuItem menuItem)
at Telerik.WinControls.UI.GridFilterCellElement.FilterFunctionButton.item_Click(Object sender, EventArgs e)
at Telerik.WinControls.RadItem.OnClick(EventArgs e)
at Telerik.WinControls.UI.RadButtonItem.OnClick(EventArgs e)
at Telerik.WinControls.UI.RadMenuItemBase.OnClick(EventArgs e)
at Telerik.WinControls.UI.RadMenuItem.OnClick(EventArgs e)
at Telerik.WinControls.RadItem.DoClick(EventArgs e)
at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.DoMouseUp(MouseEventArgs e)
at Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.RadControl.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at Telerik.WinControls.RadControl.WndProc(Message& m)
at Telerik.WinControls.UI.RadPopupControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Microsoft.AdCenter.CommunityPlatform.UI.Desktop.Program.Main() in d:\CpDev\private\src\UI\Desktop\Program.cs:line 17
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()