Telerik Forums
UI for WPF Forum
1 answer
70 views
Hi there,

I have defined a few shortcuts in my application (like Ctrl + N, Ctrl + E, no standard shortcuts). It seems that the shortcits are not working when your focus is in the NumericUpDown contorl. Is this a known bug or is there a work around?

Regards Koert
Hristo Borisov
Telerik team
 answered on 25 Sep 2009
1 answer
100 views
In my application I'd like to allow the user to save the grid view so it can be loaded the next time he opens the grid.    The view should preserve the groups, sorts, filters, column order, etc.   Is there a way I easily achieve this?   Do you have an example I can uses as reference?

Thanks in advance for you help,
Marco
Missing User
 answered on 25 Sep 2009
1 answer
78 views
Hello,
I need my application to allow user to directly edit data in a column cell.
In the XAML file I have set IsReadOnly="False".
When the application runs if I double click on it or I press F2 key, the data contained disappears but it is impossible to input anything else.
If then I press ESC the old data reappears.
The column DataMemberPath is set to a Double value, or better, it is a SQL Server "money" data type, inclued in a LINQ data context.

What do I miss?

Thanks a lot in advance.

Nick
Nedyalko Nikolov
Telerik team
 answered on 24 Sep 2009
1 answer
69 views
Hello,

I am trying to show the arrow (generatearrowcue) when the user drag and drop the tree node  in to list box. Here is my code snippet and the OnDragQuery event is not firing. Can you please help me what i am doing wrong.

this.tvMetadata.AddHandler(RadDragAndDropManager.DragQueryEvent, new EventHandler<DragDropQueryEventArgs>(OnDragQuery));
this.tvMetadata.AddHandler(RadDragAndDropManager.DragInfoEvent, new EventHandler<DragDropEventArgs>(OnDragInfo));

void OnDragInfo(object sender, DragDropEventArgs e)  

{
if (e.Options.Status == DragStatus.DragComplete) {

e.Handled = true;  

}

}

void OnDragQuery(object sender, DragDropQueryEventArgs e)  

{
if (e.Options.Status == DragStatus.DragQuery)  

{

e.Options.ArrowCue = RadDragAndDropManager.GenerateArrowCue();  

}

}

Kiril Stanoev
Telerik team
 answered on 24 Sep 2009
1 answer
102 views
I've created a Carousel passing a list using the ItemSource member. What I would like to do is get data from the item that was clicked on. So for example one of the values in the list is title, when I click on an item I would like to pass the Title of the item I clicked. I created a MouseDown Handler but I can't figure out how to get that data.
Thanks in advance.
Milan
Telerik team
 answered on 24 Sep 2009
1 answer
77 views
I am using WPF RadGridview and have some aggregate functions like sum
 <telerik:GridViewDataColumn Header="OWNED" ToolTip="Owned" HeaderTextAlignment="Center"  DataMemberBinding="{Binding OWNED}" IsEnabled="False"  IsReadOnly="False" >
                                    <telerik:GridViewDataColumn.AggregateFunctions>
                                        <telerik:SumFunction Caption="Owned: "  SourceField="OWNED" />
                                    </telerik:GridViewDataColumn.AggregateFunctions>
                                </telerik:GridViewDataColumn>
It works good if I am tabing out of this cell.But it doesn't update SUM(without tabing) when I am click on some other control other than grid immediately after editing OWNED field value on grid.I have tried RadGridView_lostFocus which doesn't do any good.Please provide me the solution for this ASAP as i am mid of implementation.



Stefan Dobrev
Telerik team
 answered on 24 Sep 2009
2 answers
99 views

Hello,
I have a question, if I don't set the property of axisY, the default value of AutoRange is 'true' .
Like following example, First I add some plus value to the dataseries , and then I add some minus value to the dataseries.
After that the chart crashes, it just can't show the points I add.
Can you help me to solve the problem? Thank you!

 for (int i = 0; i < 6; i++)
   {

        ChartArea.DataSeries.First().Add(new DataPoint(i, 0.01 * i));
   }

   for (int i = 6; i < 10; i++)
   {

        ChartArea.DataSeries.First().Add(new DataPoint(i, -0.01 * i));
   }

Ves
Telerik team
 answered on 24 Sep 2009
3 answers
234 views
hi all,
i recently started using telerik controls for wpf.

i wud like to save grid settings like column order, grouping, sorting etc.
i want to have a column chooser for my grid and save the columns users select along with other settings.

i wud like to save these settings in the database on a button click.

please can anyone let me know if this is possible in wpf and if yes then how.

thank u
sandy
Vlad
Telerik team
 answered on 24 Sep 2009
1 answer
117 views
I am dynamically binding the .ItemsSource and .DataContext property to a datatable in code like such:

 

Dim myDataTable As New DataTable

 

myDataTable = GetDataTable() 'returns datatable with multiple rows

 

 

Me.myRadCarousel.ItemsSource = myDataTable

However, the carousel shows blank images, even though they exist. I double-click on the carousel to get the file name and I get the file name no issue. my datatable contains 1 field (filename)

 

<

 

Window.Resources>

 

 

 

 

 

 

<Style TargetType="{x:Type telerik:CarouselDataRecordPresenter}">

 

 

 

 

 

 

<Setter Property="Template">

 

 

 

 

 

 

<Setter.Value>

 

 

 

 

 

 

<ControlTemplate TargetType="{x:Type telerik:CarouselDataRecordPresenter}">

 

 

 

 

 

 

<Grid IsHitTestVisible="False" HorizontalAlignment="Stretch"

 

 

 

 

 

VerticalAlignment="Stretch">

 

 

 

 

 

 

<Image Source="{Binding Path=Fields[filename].Value}" Height="400" Width="400" />

 

 

 

 

 

 

</Grid>

 

 

 

 

 

 

</ControlTemplate>

 

 

 

 

 

 

</Setter.Value>

 

 

 

 

 

 

</Setter>

 

 

 

 

 

 

</Style>

 

 

 

 

 

 

</Window.Resources>

 

Milan
Telerik team
 answered on 23 Sep 2009
1 answer
195 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?