Telerik Forums
UI for WPF Forum
1 answer
193 views
I am currently experiancing an issue when grouping columns.  I receive the following exception:

System.InvalidOperationException: No method 'Select' on type 'System.Linq.Queryable' is compatible with the supplied arguments.

I use the following code to create the grouping. The exception occurs on line 19.  I also have this issue if I drag and drop a column into the grouping header. 

 private void ExecuteGroupCommand(Object sender, ExecutedRoutedEventArgs e) {  
            telc.RadGridView grid = sender as telc.RadGridView;  
 
            if (grid != null) {  
                if (grid.CurrentCell != null) {  
                    teld.IFieldDescriptor fieldDescriptor = grid.CurrentCell.Column;  
 
                    // determine if a group descriptor for the current cell already exists  
                    teld.GroupDescriptor groupDescriptor = grid.GroupDescriptors.FirstOrDefault<teld.GroupDescriptor>(  
                        possibleDescriptor => possibleDescriptor.Member.Equals(fieldDescriptor.UniqueName));  
 
                    // if no group descriptor is found then create one and add it to the group descriptor collection.  
                    // if one exists then the grid is already grouped by the selected cell so there is no need to   
                    // do it again.  
                    if (groupDescriptor == null) {  
                        groupDescriptor = new teld.GroupDescriptor();  
                        groupDescriptor.Member = fieldDescriptor.UniqueName;  
                        groupDescriptor.SortDirection = System.ComponentModel.ListSortDirection.Ascending;  
                        grid.GroupDescriptors.Add(groupDescriptor);  
                    }  
                }  
            }  
 
            e.Handled = true;  
        } 

[Exception Details]

System.Reflection.TargetInvocationException was unhandled
  Message="Exception has been thrown by the target of an invocation."
  Source="mscorlib"
  StackTrace:
       at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Delegate.DynamicInvokeImpl(Object[] args)
       at System.Windows.RoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
       at Telerik.Windows.Controls.GridView.GridViewItemsControl.RaiseGroupingEvent(IColumnInfo draggedCell, Int32 index, GroupingEventAction groupingEventAction)
       at Telerik.Windows.Controls.GridView.GridViewGroupPanel.Telerik.Windows.Controls.GridView.DragDrop.IDropTarget.Drop(UIElement draggedElement)
       at Telerik.Windows.Controls.GridView.DragDrop.DragDropManager.EndDrag(Boolean drop)
       at Telerik.Windows.Controls.GridView.DragDrop.WpfDragDropManager.EndDrag(Boolean drop)
       at Telerik.Windows.Controls.GridView.DragDrop.DragDropManager.ProcessMouseLeftButtonUp()
       at Telerik.Windows.Controls.GridView.GridViewHeaderCell.OnMouseLeftButtonUp(MouseButtonEventArgs e)
       at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
       at System.Windows.UIElement.CrackMouseButtonEventAndReRaiseEvent(DependencyObject sender, MouseButtonEventArgs e)
       at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
       at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at Iti.Ccs.Shell.App.Main() in C:\Users\arodriguez\Documents\ITI.CCS\Trunk\Source\Iti.Ccs.Shell\obj\Debug\App.g.cs:line 0
       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()
  InnerException: System.InvalidOperationException
       Message="No method 'Select' on type 'System.Linq.Queryable' is compatible with the supplied arguments."
       Source="System.Core"
       StackTrace:
            at System.Linq.Expressions.Expression.FindMethod(Type type, String methodName, Type[] typeArgs, Expression[] args, BindingFlags flags)
            at System.Linq.Expressions.Expression.Call(Type type, String methodName, Type[] typeArguments, Expression[] arguments)
            at Telerik.Windows.Data.QueryableExtensions.CallQueryableMethod(IQueryable source, String methodName, LambdaExpression selector)
            at Telerik.Windows.Data.QueryableExtensions.Select(IQueryable source, LambdaExpression selector)
            at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilderBase.CreateQuery()
            at Telerik.Windows.Data.Expressions.GroupDescriptorCollectionExpressionBuilder.CreateQuery()
            at Telerik.Windows.Data.QueryableExtensions.GroupBy(IQueryable source, GroupDescriptorCollection groupDescriptors)
            at Telerik.Windows.Data.QueryableCollectionView.CreateView()
            at Telerik.Windows.Data.QueryableCollectionView.get_QueryableView()
            at Telerik.Windows.Data.QueryableCollectionView.CreateInternalList()
            at Telerik.Windows.Data.QueryableCollectionView.get_InternalList()
            at Telerik.Windows.Data.QueryableCollectionView.GetEnumerator()
            at Telerik.Windows.Data.RecordFactory.<CreateRecordsForGroupRecord>d__0.MoveNext()
            at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
            at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
            at Telerik.Windows.Controls.GridView.GridViewDataControl.PopulateRecords()
            at Telerik.Windows.Controls.GridView.GridViewDataControl.LoadData()
            at Telerik.Windows.Controls.GridView.GridViewDataControl.OnCollectionViewCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
            at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
            at Telerik.Windows.Data.QueryableCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
            at Telerik.Windows.Data.QueryableCollectionView.RefreshAndRaiseCollectionChanged(NotifyCollectionChangedEventArgs args)
            at Telerik.Windows.Data.QueryableCollectionView.Refresh()
            at Telerik.Windows.Data.QueryableCollectionView.EndDefer()
            at Telerik.Windows.Data.QueryableCollectionView.DeferHelper.Dispose()
            at Telerik.Windows.Controls.GridView.GridViewDataControl.PerformGrouping(String member, Object displayContent, Nullable`1 insertionIndex)
            at Telerik.Windows.Controls.GridView.GridViewDataControl.<>c__DisplayClass2a.<GroupingRequested>b__29()
            at Telerik.Windows.Controls.CursorManager.PerformTimeConsumingOperation(FrameworkElement frameworkElement, Action action)
            at Telerik.Windows.Controls.GridView.GridViewDataControl.GroupingRequested(Object origin, GroupingRequestedEventArgs e)
       InnerException:


Stefan Dobrev
Telerik team
 answered on 23 Sep 2009
2 answers
108 views
Hi.
I am trying to do the following:
I want to create a ComboBox which can be used like an editable Combobox (i.e. type into the Textfield and select from the auto-complete..) but only entries currently in the combobox shuld be selectable.

The description for the 3rd Combobox on the Combobox/Fist Look Examples page reads somehat like this but typing ist not allowed in that Combobox. (What I expected by setting IsReadOnly, anyhow..)

So - Is it posiible to transform the DropDownCombobox into a keyboard-navigateable-but-non-entiable-Combobox ?

Yours,
Nils
Valeri Hristov
Telerik team
 answered on 23 Sep 2009
1 answer
111 views
I have an application that uses Telerik controls, standard WPF controls such as text boxes, and some third party controls from another vendor.  I want to give my customers the ability to customize colors, brushes, etc.  The problem is that the various toolkits are using different resource keys.  If I want to tell the customer how to change the rollover background brush for buttons, I have to tell him about three different resource keys, one for System.Windows.Controls.Button buttons, one telerik buttons, and one for buttons in the other 3rd party toolset.  I would rather document one resource key that the user sets in app.xaml and then have some startup code in my app that propagates the setting to the appropriate resource dictionaries for the various tookits.
 
How do I do that with Telerik controls?  Can I just store a value for the telerik resource key in the application resource dictionary?  Or do I have to store it somewhere else?
Kalin Milanov
Telerik team
 answered on 23 Sep 2009
1 answer
477 views
Hi
I've got a data bound Combox that displays the data from the DB just fine. As the list is a little large, we allow the user to enter in text and auto complete kicks in using telerikSearch:TextSearch.TextPath="..." (as from the sample).

If the user then deletes parts of the text to something that doesn't exist in the list, the resultant entry could be invalid. I've tried various combinations of IsEditable and IsReadOnly being set to true / false but haven't got the desired behaviour.

What I would like to do is either:
1. Wire this combobox up to standard WPF validation. How does this work for this control?
2. Only allow the user to enter text that matches the list and disable them from deleting text to invalidate the entry

Thanks in advance!
Milan
Telerik team
 answered on 23 Sep 2009
1 answer
51 views
Hello everybody...
I need to trap when a cell is edit through the keyboard.
How can I do?

Thanks!

Nick
Milan
Telerik team
 answered on 23 Sep 2009
3 answers
175 views
Hi,

We are working with some large numbers on the Radial Gauge. Some of these numbers are overlapping on our custom gauge unless the font size is set unacceptably low with few labels on the gauge. Also, large numbers (in the 10s of billions range) look rather square in contrast to the curved radial scale.

Is there any way to have tick label text curve around with the radial scale? Do you have any suggestions on the best approach?

Cheers,
Wayne Reid
Andrey
Telerik team
 answered on 23 Sep 2009
3 answers
81 views
Hello,

I recently installed TELERIK 2009Q2 for WPF and every thing went fine.

When I create a new project and add a gridview control using View -> Toolbox,
the control and all the other DLLs point to the library where the older Telerik version was installed (and still exist on my computer).

I did an automatic MSI install and not a manual one.

Your help will be most appreciated.

Erez
Milan
Telerik team
 answered on 22 Sep 2009
3 answers
211 views
I have downloaded the trial and demo for the WPF. Could someone tell me how the left navigation bar is built? This is the panel with all the images for each control in the toolkit that you can select.

I open it in VS and HomePage.xaml does not seem to contain it. Examples.xml seems to contain declarations for the items in the list.

I am new to WPF and Telerik so thanks for bearing with me.
SingleMalt
Top achievements
Rank 1
 answered on 22 Sep 2009
1 answer
149 views
hi all,

i wud like to have a column chooser in my contex menu, along with other menu items. please can you let me know if there is any control for column chooser in wpf. my context menu is against gridview control.

also, i have noticed that, in wpf demos, the code behind tab shows xaml code and codebehind is not available at all. it will be helpful if you can fix it.

Thank u,
sandy
Missing User
 answered on 22 Sep 2009
5 answers
220 views
Hello,

we need drag & drop function from a datagrid to a listview, our structure is in xml.

Is this possible?

We have not found a possibility to do databinding with an xml structure,
nevertheless that's our criterion to buy this software,

thx for your help.

With regards,
Matthias

p.s. Can we customize the style/design of the several templates?
Nikolay
Telerik team
 answered on 21 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?