Telerik Forums
UI for WPF Forum
2 answers
141 views

Whenever I attempt to remove a group from the grid grouping area, either by dragging or clicking the 'close' button, an exception occurs.

I am using Q3 SP2 and VS2010 project (.NET4)
I have tried the same code in a .NET 3.5 project and the exception does not occur.

InvalidCastException:
Unable to cast object of type 'MS.Internal.NamedObject' to type 'Telerik.Windows.Data.GroupDescriptor'.

   at Telerik.Windows.Data.GroupDescriptor.Equals(Object obj) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Data\Grouping\GroupDescriptor.cs:line 191
   at System.Object.Equals(Object objA, Object objB)
   at System.Windows.Data.BindingExpression.OnDataContextChanged(DependencyObject contextElement)
   at System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.Data.BindingExpressionBase.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.TreeWalkHelper.OnInheritablePropertyChanged(DependencyObject d, InheritablePropertyChangeInfo info)
   at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
   at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
   at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
   at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
   at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
   at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
   at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
   at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
   at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
   at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
   at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
   at System.Windows.DescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
   at System.Windows.TreeWalkHelper.InvalidateOnInheritablePropertyChange(FrameworkElement fe, FrameworkContentElement fce, InheritablePropertyChangeInfo info, Boolean skipStartNode)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at System.Windows.Controls.ItemContainerGenerator.UnlinkContainerFromItem(DependencyObject container, Object item)
   at System.Windows.Controls.ItemContainerGenerator.OnItemRemoved(Object item, Int32 itemIndex)
   at System.Windows.Controls.ItemContainerGenerator.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   at System.Windows.Controls.ItemContainerGenerator.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
   at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
   at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
   at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
   at System.Windows.Controls.ItemCollection.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
   at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
   at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
   at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
   at System.Windows.Data.ListCollectionView.ProcessCollectionChangedWithAdjustedIndex(NotifyCollectionChangedEventArgs args, Int32 adjustedOldIndex, Int32 adjustedNewIndex)
   at System.Windows.Data.ListCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
   at System.Windows.Data.CollectionView.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\RadObservableCollection.cs:line 141
   at System.Collections.ObjectModel.ObservableCollection`1.RemoveItem(Int32 index)
   at Telerik.Windows.Data.RadObservableCollection`1.RemoveItem(Int32 index) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\RadObservableCollection.cs:line 212
   at Telerik.Windows.Data.ObservableItemCollection`1.RemoveItem(Int32 index) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\ObservableItemCollection.cs:line 68
   at System.Collections.ObjectModel.Collection`1.Remove(T item)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.Ungroup(String member) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3302
   at Telerik.Windows.Controls.GridView.GridViewDataControl.<>c__DisplayClass2a.<GroupingRequested>b__29() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3196
   at Telerik.Windows.Controls.CursorManager.PerformTimeConsumingOperation(FrameworkElement frameworkElement, Action action) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\CursorManager.cs:line 16
   at Telerik.Windows.Controls.GridView.GridViewDataControl.GroupingRequested(Object origin, GroupingRequestedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3177


XAML

<Window  
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    x:Class="WpfApplication1.MainWindow" 
    x:Name="Window" 
    Title="MainWindow" 
    Width="640" Height="480" 
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"   > 
 
    <Grid x:Name="LayoutRoot">  
        <telerik:RadGridView x:Name="grid">  </telerik:RadGridView> 
    </Grid> 
</Window> 

I used the code behind file for simplicity of testing:
using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Text;  
using System.Windows;  
using System.Windows.Controls;  
using System.Windows.Data;  
using System.Windows.Documents;  
using System.Windows.Input;  
using System.Windows.Media;  
using System.Windows.Media.Imaging;  
using System.Windows.Shapes;  
 
namespace WpfApplication1  
{  
    /// <summary>  
    /// Interaction logic for MainWindow.xaml  
    /// </summary>  
    public partial class MainWindow : Window  
    {  
        public List<DOStaff> col = new List<DOStaff>();  
          
        public MainWindow()  
        {  
              
            this.InitializeComponent();  
 
            // Insert code required on object creation below this point.  
                  
            DOStaff tempStaff = new DOStaff();  
            tempStaff.FirstName = "staf12399";  
              
            col.Add(tempStaff);   
          
            DOStaff tempStaff1 = new DOStaff();  
            tempStaff1.FirstName = "staf12399";  
              
            col.Add(tempStaff1);      
              
            grid.ItemsSource=col;  
              
        }  
    }  
      
    public class DOStaff  
    {  
        public virtual string FirstName { getset;}  
      
    }  
      
Pavel Pavlov
Telerik team
 answered on 28 Jan 2010
3 answers
202 views
Hello,

I would like to hide the Calender in a DatePicker and I would like
to set the focus to the Input Box.
If I use RadDatePicker.Focus() the Focus is set to the out control.

Do you have any idea?

Thanks a lot!
Kaloyan
Telerik team
 answered on 28 Jan 2010
11 answers
139 views
Hello!
I really like the RadDocking component and all it's features and I will like to use it in my application but I think it has a major drawback at this moment, or it's only me not knowing how to use it.
The problem:
When there is a RadPane undocked you can see a button that it's opening the RadPane if the mouse it's over it. Opening the RadPane is made with some kind of an ugly animation, for example if the pane is docked in the left side, the animation reveals it from left to right but slowly and clipping. Is there any way to disable this animation and only make the RadPane visible or not?
Not to mention that if in the DocumentHost I have a real time chart - as in my application, every time the chart has new data (redrawing itself), the RadPane is clipping ( again! :) still in undocked mode)

So for an application that is already requiring many resources I need a stable & robust component. Can you help me in that direction?

Regards,
RoxanaC
Kaloyan
Telerik team
 answered on 28 Jan 2010
5 answers
178 views
How do I achieve the following SeriesMapping in XAML?

ItemMapping itemMapping; 
 
            //ValueA Line 
            SeriesMapping seriesMappingA = new SeriesMapping(); 
            seriesMappingA.SeriesDefinition = new LineSeriesDefinition() { ShowItemLabels = false }; 
            seriesMappingA.LegendLabel = "ValueA Performance"
 
            itemMapping = new ItemMapping(); 
            itemMapping.DataPointMember = DataPointMember.XValue; 
            itemMapping.FieldName = "Date"
            seriesMappingA.ItemMappings.Add(itemMapping); 
 
            itemMapping = new ItemMapping(); 
            itemMapping.DataPointMember = DataPointMember.YValue; 
            itemMapping.FieldName = "ValueA"
            seriesMappingA.ItemMappings.Add(itemMapping); 
 
            RadChart1.SeriesMappings.Add(seriesMappingA); 
 
            //ValueB Line 
            SeriesMapping seriesMappingB = new SeriesMapping(); 
            seriesMappingB.SeriesDefinition = new LineSeriesDefinition() { ShowItemLabels = false }; 
            seriesMappingB.LegendLabel = "ValueB Performance"
 
            itemMapping = new ItemMapping(); 
            itemMapping.DataPointMember = DataPointMember.XValue; 
            itemMapping.FieldName = "Date"
            seriesMappingB.ItemMappings.Add(itemMapping); 
 
            itemMapping = new ItemMapping(); 
            itemMapping.DataPointMember = DataPointMember.YValue; 
            itemMapping.FieldName = "ValueB"
            seriesMappingB.ItemMappings.Add(itemMapping); 
 
            RadChart1.SeriesMappings.Add(seriesMappingB); 
 
            RadChart1.DefaultView.ChartArea.AxisX.LabelRotationAngle = 45; 
            RadChart1.DefaultView.ChartArea.AxisX.DefaultLabelFormat = "dd/MM/yyyy"

Jeffrey
Top achievements
Rank 1
 answered on 28 Jan 2010
4 answers
257 views
 

I Have a RadContextMenu in XAML in a RadTreeView that works fine. I dynamically load the tree items, and certain tree items I add a different Context menu, but it always opens the RadContextMenu in xaml. If I remove the xaml RadContextMenu ref, the dynamic ContextMenu loads.

So I guess is there a way to prevent every child from inheriting its parents context menu?

Thanks
TheLostLeaf
Top achievements
Rank 2
 answered on 27 Jan 2010
4 answers
330 views
Hi,

I'm trying to use the DataGridView control with a DataTemplate.    This bit seems ok at the moment.

I am planning on using a convertor to automatically select the CellStyle based on the value of the column.  I expect this shouldn't be too tricky.

What I am having problems with is trying to bind the content of the control to another cell's value.  Or using another cells value for a property. 

Any help/examples would be greatly appreciated.

Eg

Record
======

Name = "My Textbox"
Control = "Textbox"
Default = "This is my default value"

The Control Column will become a TextBox and I would like the TextBox Value to become the value of the Default,

I have tried things like

Text="{Binding Default}"
Text="{Binding Path=Default, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:GridViewRow}}}"

<UserControl x:Class="WizardAdvanced" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">  
    <Grid> 
        <Grid.Resources> 
            <Style x:Key="CheckboxCellStyle" TargetType="{x:Type telerik:GridViewCell}">  
                <Setter Property="ContentTemplate">  
                    <Setter.Value> 
                        <DataTemplate> 
                            <CheckBox VerticalAlignment="Center" /> 
                        </DataTemplate> 
                    </Setter.Value> 
                </Setter> 
            </Style> 
            <Style x:Key="TextboxCellStyle" TargetType="{x:Type telerik:GridViewCell}">  
                <Setter Property="ContentTemplate">  
                    <Setter.Value> 
                        <DataTemplate> 
                            <TextBox Text="{Binding Default}" /> 
                        </DataTemplate> 
                    </Setter.Value> 
                </Setter> 
            </Style> 
            <Style x:Key="ListboxCellStyle" TargetType="{x:Type telerik:GridViewCell}">  
                <Setter Property="ContentTemplate">  
                    <Setter.Value> 
                        <DataTemplate> 
                            <ComboBox  HorizontalAlignment="Left" VerticalAlignment="Bottom"/>  
                        </DataTemplate> 
                    </Setter.Value> 
                </Setter> 
            </Style> 
        </Grid.Resources> 
          
        <telerik:RadGridView Margin="0" Name="Grid" AutoGenerateColumns="False">  
            <telerik:RadGridView.Columns> 
                <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Name}"></telerik:GridViewDataColumn> 
                <telerik:GridViewDataColumn Header="Control" DataMemberBinding="{Binding Control}" CellStyle="{StaticResource TextboxCellStyle}"></telerik:GridViewDataColumn> 
                <telerik:GridViewDataColumn Header="Default" DataMemberBinding="{Binding Default}"></telerik:GridViewDataColumn> 
 
            </telerik:RadGridView.Columns> 
        </telerik:RadGridView> 
 
    </Grid> 
</UserControl> 
 
Pavel Pavlov
Telerik team
 answered on 27 Jan 2010
2 answers
137 views
Hi,

I need to have control over the reordering of columns. More specific, in case the user reorder column, i need to reorder another column in order to keep the symmetry.

I tried to use ColumnReordered event but i have 2 problems with this approach:

1) I am having infinite loop, because i also have to user grid.ReorderColumns  (and then i get the event again)

2) in the  ColumnReordered  event i don't have the original index of the column before the reordering. I need it in order to know which other column should i reorder.

Thanks,

Ofer
Tsvyatko
Telerik team
 answered on 27 Jan 2010
3 answers
124 views
Hi,

version:2009.3.1314.35
.net 4.0 beta 2

I have the following problem:

Dragging a column to the grouppanel goes well, but when I try to ungroup I get the following error:

System.InvalidCastException was unhandled by user code
  Message=Unable to cast object of type 'MS.Internal.NamedObject' to type 'Telerik.Windows.Data.GroupDescriptor'.
  Source=Telerik.Windows.Data
  StackTrace:
       at Telerik.Windows.Data.GroupDescriptor.Equals(Object obj) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Data\Grouping\GroupDescriptor.cs:line 191
       at System.Object.Equals(Object objA, Object objB)
       at System.Windows.Data.BindingExpression.OnDataContextChanged(DependencyObject contextElement)
       at System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
       at System.Windows.Data.BindingExpressionBase.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
       at System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
       at System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.TreeWalkHelper.OnInheritablePropertyChanged(DependencyObject d, InheritablePropertyChangeInfo info)
       at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
       at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
       at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
       at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
       at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
       at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
       at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
       at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
       at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
       at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
       at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
       at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
       at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
       at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
       at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
       at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
       at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
       at System.Windows.DescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
       at System.Windows.TreeWalkHelper.InvalidateOnInheritablePropertyChange(FrameworkElement fe, FrameworkContentElement fce, InheritablePropertyChangeInfo info, Boolean skipStartNode)
       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at System.Windows.Controls.ItemContainerGenerator.UnlinkContainerFromItem(DependencyObject container, Object item)
       at System.Windows.Controls.ItemContainerGenerator.OnItemRemoved(Object item, Int32 itemIndex)
       at System.Windows.Controls.ItemContainerGenerator.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Windows.Controls.ItemContainerGenerator.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
       at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
       at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
       at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
       at System.Windows.Controls.ItemCollection.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
       at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
       at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
       at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
       at System.Windows.Data.ListCollectionView.ProcessCollectionChangedWithAdjustedIndex(NotifyCollectionChangedEventArgs args, Int32 adjustedOldIndex, Int32 adjustedNewIndex)
       at System.Windows.Data.ListCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
       at System.Windows.Data.CollectionView.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\RadObservableCollection.cs:line 141
       at System.Collections.ObjectModel.ObservableCollection`1.RemoveItem(Int32 index)
       at Telerik.Windows.Data.RadObservableCollection`1.RemoveItem(Int32 index) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\RadObservableCollection.cs:line 212
       at Telerik.Windows.Data.ObservableItemCollection`1.RemoveItem(Int32 index) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\ObservableItemCollection.cs:line 68
       at System.Collections.ObjectModel.Collection`1.Remove(T item)
       at Telerik.Windows.Controls.GridView.GridViewDataControl.Ungroup(String member) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3302
       at Telerik.Windows.Controls.GridView.GridViewDataControl.<>c__DisplayClass2a.<GroupingRequested>b__29() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3196
       at Telerik.Windows.Controls.CursorManager.PerformTimeConsumingOperation(FrameworkElement frameworkElement, Action action) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\CursorManager.cs:line 16
       at Telerik.Windows.Controls.GridView.GridViewDataControl.GroupingRequested(Object origin, GroupingRequestedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3177
  InnerException:
Pavel Pavlov
Telerik team
 answered on 27 Jan 2010
5 answers
626 views
Can I do a VU meter (like progressbar and "analog") with Gauges? This is the design I'm look for. I'm not a graphicdesigner so I need som help. See attachment.
Velin
Telerik team
 answered on 26 Jan 2010
2 answers
92 views
Hi,

I am trying to set a DataTable as ItemsSource for a RadGridView and get the following exception:

   at System.Linq.Enumerable.<CastIterator>d__aa`1.System.Collections.IEnumerator.Reset()
   at Telerik.Windows.Data.EnumerableExtensions.TryGetFirstElementType(IEnumerable source, Type& firstElementType) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\EnumerableExtensions.cs:line 54

I do the following:

DataTable

 

dataTable = new DataTable();

 

 

string[] values = dataValue.Value.Split(',');

 

 

for (int i = 0; i < values.Length; i++)

 

{

dataTable.Columns.Add(i.ToString(),

typeof(string));

 

}

dataTable.Rows.Add(values);

 

this.radGridView1.AutoGenerateColumns = true;

 

 

this.radGridView1.ItemsSource = dataTable;

 



Anybody has some suggestions what I am doing wrong here?
Pascal
Top achievements
Rank 1
 answered on 26 Jan 2010
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?