Telerik Forums
UI for WPF Forum
2 answers
230 views
Hi,

Sometimes when copy and paste diagram items, I get error says "An item with the same key has already been added."

Here is the call stack
==========================================================================================

System.ArgumentException was unhandled
  HResult=-2147024809
  Message=An item with the same key has already been added.
  Source=mscorlib
  StackTrace:
       at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
       at Telerik.Windows.Diagrams.Core.SerializationService.DeserializeItems(SerializationInfo serializationInfo, Boolean makeUnique)
       at Telerik.Windows.Controls.Diagrams.DataTransferService.HandleDiagramElementDrop(DataObject dataObject)
       at Telerik.Windows.Controls.Diagrams.DataTransferService.HandlePaste(DataObject dataObject, Action`1 action)
       at Telerik.Windows.Controls.RadDiagram.Paste()
       at Telerik.Windows.Controls.RadDiagram.OnPasteCommandExecuted(Object sender, ExecutedRoutedEventArgs e)
       at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
       at System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
       at System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
       at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
       at System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
       at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
       at System.Windows.Input.CommandManager.TranslateInput(IInputElement targetElement, InputEventArgs inputEventArgs)
       at System.Windows.UIElement.OnKeyDownThunk(Object sender, KeyEventArgs e)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
       at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
       at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
       at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers)
       at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
       at System.Windows.Interop.HwndSource.OnPreprocessMessageThunk(MSG& msg, Boolean& handled)
       at System.Windows.Interop.ComponentDispatcherThread.RaiseThreadMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.TranslateAndDispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run()

========================================================

Thanks,

Ahmed
Ahmed
Top achievements
Rank 1
 answered on 26 Jan 2015
2 answers
370 views
We have a RadPropertyGrid with its items being auto-generated.

How can I set Tooltips to the labels and/or to the editors being generated???

Tooltips should be set inside auto-generation 
Maurizio
Top achievements
Rank 2
 answered on 26 Jan 2015
1 answer
125 views
If RadGridView has vertical scroll bar and I tab out the scroll viewer scrolls on its own.

I have 1 gridView and 2 buttons, I select a row on gridview and then hit tab,  the focus is on the button but the grid automatically scrolls.

<Grid DataContext="{StaticResource MyViewModel}">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <telerik:RadGridView Name="playersGrid" 
ItemsSource="{Binding Players}" 
AutoGenerateColumns="False">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" TabStopMode="Skip"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Number}" TabStopMode="Skip"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Position}" TabStopMode="Skip"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Country}" TabStopMode="Skip"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>

        <StackPanel Grid.Row="1" Orientation="Horizontal">
            <telerik:RadButton Name="Button1"
  Content="ScrollIntoView" 
  Click="Button1_Click"
  Margin="5"
  HorizontalAlignment="Left"/>
            <telerik:RadButton Name="Button2"
  Content="BringIndexIntoView" 
  Click="Button2_Click"
  Margin="5"
  HorizontalAlignment="Left"/>
        </StackPanel>
    </Grid>
Boris
Telerik team
 answered on 26 Jan 2015
3 answers
275 views
I am using the newest version of telerik libraries, but on my ChartView controls are null values displayed as 0s so on LineChart lines are there evry time pointing to 0 where null value is avaiulable.

Is this the way it is supposed to work ? DoI have to use old version of Chart (RadChart) to have empty (null) vales properly displayed ?

Cheers,
Robert
Petar Marchev
Telerik team
 answered on 26 Jan 2015
9 answers
147 views

There are descriptors for Categorical, Scatter, and Polar. What about for RangeSeries?


Thanks - Mitch

Martin Ivanov
Telerik team
 answered on 26 Jan 2015
3 answers
107 views
Hi,

I want to use the default drag/no-drag cursors on the RadTreeListView control to keep it consistent with other controls. However I see that RadTreeListView implements OnGiveFeedback event and always sets the cursor to an 'Arrow' and also sets e.Handled to true. Firstly, the cursor here should be set based on DragDropEffects and should not be forced to Arrow. Secondly, e.Handled should not be set to true as one can never add a handler the OnGiveFeedback event which I can use to change the arrow. Attached is a screenshot..

RadTreeListView.cs
private void OnGiveFeedback(object sender, Telerik.Windows.DragDrop.GiveFeedbackEventArgs e)
  {
    e.SetCursor(Cursors.Arrow);
    e.Handled = true;
    if (e.Effects != DragDropEffects.None)
      return;
    this.OnDropImpossible(this.CurrentDragVisual);
  }
Nick
Telerik team
 answered on 24 Jan 2015
5 answers
389 views
Hi,

we want to bind a RadGridView to a collection of objects that implement DynamicObject. However, we don't want to bind to the dynamic properties, but only classical properties (e.g. the Name property in the following example).

public class MyDynamicObject : DynamicObject
{
    public string Name { get; set; }
 
    public override bool TryGetMember(GetMemberBinder binder, out object result)
    {
        return base.TryGetMember(binder, out result);
    }
 
    public override bool TrySetMember(SetMemberBinder binder, object value)
    {
        return base.TrySetMember(binder, value);
    }
}

However, the RadGridView only tries to bind to the dynamic members and throws exceptions if the dynamic member is not found. It does not even check if there is a normal property with the same name. This affects not only binding, but also sorting, grouping and filtering.
The typical behavior in WPF (e.g. when using a binding) and C# (when using the dynamic keyword) is to check for normal properties first! This should be the same in the RadGridView.

Alex
Ivan Ivanov
Telerik team
 answered on 24 Jan 2015
4 answers
236 views
What's the easiest way to style the border of the WPF DropDownButton popup?
Hans
Top achievements
Rank 2
 answered on 23 Jan 2015
11 answers
464 views

I was reading this thread:

http://www.telerik.com/community/forums/wpf/gridview/column-chooser.aspx

Can you please post a working wpf example since I cannot get the code to compile when I replace the rad context menu with the standard windows context menu. Can you please post a working copy using the wpf rad grid view for all of us to use?

Bill

Stefan
Telerik team
 answered on 23 Jan 2015
2 answers
311 views
I have a RadGridView with MultiSelect turned on. When this Grid is instantiated, I need to select rows that are determined from a List passed into the ViewModel. Any ideas on how to do this?  The "SelectedItems" property of the RadGridView is readonly and cannot be set via markup.

Thank you!
Steve
Top achievements
Rank 1
 answered on 23 Jan 2015
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?