Telerik Forums
UI for WPF Forum
1 answer
94 views
Hi,
I found a bug in your chart control, mainly when I set DataSeries with only 1 element and another with many, I get errors:

   w System.TimeSpan.Interval(Double value, Int32 scale) 
   w System.TimeSpan.FromSeconds(Double value) 
   w Telerik.Windows.Controls.Charting.DelayConverter.CalculateItemDelayBasedOnTotalDuration() w c:\Builds\WPF_Scrum\Charting_CI_Build\Sources\Development\Charting\Telerik.Windows.Controls.Charting\Chart\Animations\DelayConverter.cs:wiersz 87 

It looks like you divide by zero and then try to use it in TimeSpan.FromSeconds method.


Complete stacktrace:
   w System.TimeSpan.Interval(Double value, Int32 scale) 
   w System.TimeSpan.FromSeconds(Double value) 
   w Telerik.Windows.Controls.Charting.DelayConverter.CalculateItemDelayBasedOnTotalDuration() w c:\Builds\WPF_Scrum\Charting_CI_Build\Sources\Development\Charting\Telerik.Windows.Controls.Charting\Chart\Animations\DelayConverter.cs:wiersz 87 
   w Telerik.Windows.Controls.Charting.DelayConverter.CalculateValue(Double[] delayCoefficients) w c:\Builds\WPF_Scrum\Charting_CI_Build\Sources\Development\Charting\Telerik.Windows.Controls.Charting\Chart\Animations\DelayConverter.cs:wiersz 47 
   w Telerik.Windows.Controls.Charting.BaseAnimationConverter.Convert(Object value, Type targetType, Object parameter, CultureInfo culture) w c:\Builds\WPF_Scrum\Charting_CI_Build\Sources\Development\Charting\Telerik.Windows.Controls.Charting\Chart\Animations\BaseAnimationConverter.cs:wiersz 88 
   w Telerik.Windows.Controls.Charting.StaticConverter`2.Convert(Object value, Object parameter, CultureInfo culture) w c:\Builds\WPF_Scrum\Charting_CI_Build\Sources\Development\Charting\Telerik.Windows.Controls.Charting\Chart\Converters\StaticConverter.cs:wiersz 12 
   w Telerik.Windows.Controls.Charting.StaticConverter`2.Convert(Object value, Object parameter) w c:\Builds\WPF_Scrum\Charting_CI_Build\Sources\Development\Charting\Telerik.Windows.Controls.Charting\Chart\Converters\StaticConverter.cs:wiersz 22 
   w Telerik.Windows.Controls.Charting.BaseChartItem.ConfigureAnimationSettings() w c:\Builds\WPF_Scrum\Charting_CI_Build\Sources\Development\Charting\Telerik.Windows.Controls.Charting\Chart\Base\BaseChartItem.cs:wiersz 440 
   w Telerik.Windows.Controls.Charting.BaseChartItem.SetAnimationSettings() w c:\Builds\WPF_Scrum\Charting_CI_Build\Sources\Development\Charting\Telerik.Windows.Controls.Charting\Chart\Base\BaseChartItem.cs:wiersz 775 
   w Telerik.Windows.Controls.Charting.BaseChartItem.OnApplyTemplate() w c:\Builds\WPF_Scrum\Charting_CI_Build\Sources\Development\Charting\Telerik.Windows.Controls.Charting\Chart\Base\BaseChartItem.cs:wiersz 377 
   w Telerik.Windows.Controls.Charting.BaseLabelChartItem.OnApplyTemplate() w c:\Builds\WPF_Scrum\Charting_CI_Build\Sources\Development\Charting\Telerik.Windows.Controls.Charting\Chart\Base\BaseLabelChartItem.cs:wiersz 164 
   w Telerik.Windows.Controls.Charting.BasePointMarkChartItem.OnApplyTemplate() w c:\Builds\WPF_Scrum\Charting_CI_Build\Sources\Development\Charting\Telerik.Windows.Controls.Charting\Chart\Base\BasePointMarkChartItem.cs:wiersz 359 
   w System.Windows.FrameworkElement.ApplyTemplate() 
   w System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
   w System.Windows.UIElement.Measure(Size availableSize) 
   w Telerik.Windows.Controls.Charting.LinearSeriesPanel.MeasureOverride(Size availableSize) w c:\Builds\WPF_Scrum\Charting_CI_Build\Sources\Development\Charting\Telerik.Windows.Controls.Charting\Chart\ChartArea\Series\LinearSeriesPanel.cs:wiersz 139 
   w System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
   w System.Windows.UIElement.Measure(Size availableSize) 
   w MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) 
   w System.Windows.Controls.ItemsPresenter.MeasureOverride(Size constraint) 
   w System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
   w System.Windows.UIElement.Measure(Size availableSize) 
   w System.Windows.Controls.Control.MeasureOverride(Size constraint) 
   w System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
   w System.Windows.UIElement.Measure(Size availableSize) 
   w Telerik.Windows.Controls.Charting.ChartPanel.MeasureOverride(Size availableSize) w c:\Builds\WPF_Scrum\Charting_CI_Build\Sources\Development\Charting\Telerik.Windows.Controls.Charting\Chart\ChartArea\ChartPanel.cs:wiersz 39 
   w System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
   w System.Windows.UIElement.Measure(Size availableSize) 
   w MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) 
   w System.Windows.Controls.ItemsPresenter.MeasureOverride(Size constraint) 
   w System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
   w System.Windows.UIElement.Measure(Size availableSize) 
   w Telerik.Windows.Controls.Charting.ClipPanel.MeasureOverride(Size availableSize) w c:\Builds\WPF_Scrum\Charting_CI_Build\Sources\Development\Charting\Telerik.Windows.Controls.Charting\Chart\ChartArea\ClipPanel.cs:wiersz 30 
   w System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
   w System.Windows.UIElement.Measure(Size availableSize) 
   w Telerik.Windows.Controls.Charting.PlotAreaPanel.MeasureOverride(Size availableSize) w c:\Builds\WPF_Scrum\Charting_CI_Build\Sources\Development\Charting\Telerik.Windows.Controls.Charting\Chart\ChartArea\PlotAreaPanel.cs:wiersz 63 
   w System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
   w System.Windows.UIElement.Measure(Size availableSize) 
   w System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) 
   w System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV) 
   w System.Windows.Controls.Grid.MeasureOverride(Size constraint) 
   w System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
   w System.Windows.UIElement.Measure(Size availableSize) 
   w System.Windows.ContextLayoutManager.UpdateLayout() 
   w System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg) 
   w System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork() 
   w System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() 
   w System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget) 
   w System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget) 
   w System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) 
   w System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) 
   w System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) 
   w System.Windows.Threading.DispatcherOperation.InvokeImpl() 
   w System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state) 
   w System.Threading.ExecutionContext.runTryCode(Object userData) 
   w System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) 
   w System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) 
   w System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 
   w System.Windows.Threading.DispatcherOperation.Invoke() 
   w System.Windows.Threading.Dispatcher.ProcessQueue() 
   w System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 
   w MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 
   w MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 
   w System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) 
   w System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) 
   w System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) 
   w System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter) 
   w System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg) 
   w MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) 
   w MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) 
   w System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) 
   w System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame) 
   w System.Windows.Threading.Dispatcher.Run() 
   w System.Windows.Application.RunDispatcher(Object ignore) 
   w System.Windows.Application.RunInternal(Window window) 
   w System.Windows.Application.Run(Window window) 
   w System.Windows.Application.Run() 
   w RHEAClient.App.Main() w F:\RHEAClient\obj\Release\App.g.cs:wiersz 0 
   w System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) 
   w System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) 
   w Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() 
   w System.Threading.ThreadHelper.ThreadStart_Context(Object state) 
   w System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 
   w System.Threading.ThreadHelper.ThreadStart() 

Regards,
Jacek Ciereszko



Ves
Telerik team
 answered on 05 May 2009
5 answers
123 views
Hi guys,

Are there plans to allow parent/child grid hierarchies to be declared declaratively in XAML in future releases of the DataGrid? If not, this is definitely a feature I would like to request. I would make the construction of child grids much simpler and easier to implement.

Cheers

Justin
Pavel Pavlov
Telerik team
 answered on 05 May 2009
3 answers
237 views

 Hi,

I am using version  2009.1.312.35.

The RadGridView is wrapped in a StackPanel which is in a column of a Grid with a splitter.

In the following code, The last column does not take up the remaining space. Are there additional tricks to get it to work? I read this post: http://www.telerik.com/community/forums/wpf/gridview/documentation-is-frustrating.aspx, and I think I did what it suggests, but it doesn't work.

Also, will the column resize when the splitter is moved?

 

<telerik:RadGridView   
HorizontalAlignment="Stretch"   
x:Name="uxLibraryView"   
MultipleSelect="True"   
AutoGenerateColumns="False"   
ColumnsWidthMode="Fill"   
AllowDrop="False"   
ShowGroupPanel="False"   
ItemsSource="{Binding Path=LibraryMembers,Diagnostics:PresentationTraceSources.TraceLevel=High}"   
IsFilteringAllowed="False"   
telerik:GridViewCell.EditEnded="uxLibraryView_EditEnded"   
SelectionChanged="uxLibraryView_SelectionChanged">   
 
<telerik:RadGridView.Resources>   
...Context Menu Stuff ...  
</telerik:RadGridView.Resources>   
 
<telerik:RadGridView.Columns>   
    <telerik:GridViewDataColumn HeaderText="{x:Static properties:Resources.Common_Label_Type}"   
        IsReadOnly="True"   
        UniqueName="LibraryContentType"   
        Width="23">   
            <telerik:GridViewColumn.CellStyle>   
 
            <Style TargetType="{x:Type telerik:GridViewCell}">   
                <Setter Property="Template">   
                    <Setter.Value>   
                        <ControlTemplate TargetType="{x:Type telerik:GridViewCell}">   
                            <Image Stretch="None" Width="16" Height="16"   
                                        Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content, Converter = {StaticResource ContentTypeToImageConverter}}"   
                                         Margin="2,0,5,0"/>   
                        </ControlTemplate>   
                    </Setter.Value>   
                </Setter>   
            </Style>   
        </telerik:GridViewColumn.CellStyle>   
    </telerik:GridViewDataColumn>   
 
    <telerik:GridViewDataColumn HeaderText="{x:Static properties:Resources.Common_Label_Name}"   
            UniqueName="Name"   
            Width="*"    />   
    </telerik:RadGridView.Columns> 
</telerik:RadGridView> 

 

 

 

Thank you

 

 

Milan
Telerik team
 answered on 05 May 2009
5 answers
133 views
Guys,

Do we have an appsettings to set the style to all Telerik Controls for WPF like we have for ASP.NET AJAX Controls?

Regards,

Henrique
Miroslav
Telerik team
 answered on 04 May 2009
4 answers
142 views
I followed the Validation example from the demos to add validation to my gridView that happens to have a child grid.  It is working fine on the master table, however, on the child gridView, it's not working, the event is not even firing.  I'm assuming I'll have to bind the validation event to the child gridview as well, but how do I go about doing so?

Thanks,
Marty
Marty
Top achievements
Rank 1
 answered on 04 May 2009
1 answer
182 views
Hi,

In the application I'm working on, we're using CSLA.NET as the Business Object Framework. In the framework there are a couple of list classes that can be used, 2 of them are: BusinessListBase<T,C> and ReadOnlyListBase<T,C>.

In the UI I have a RadGridView bound to a list. If this list is of the type ReadOnlyListBase, everything works fine. But if I change it to a BusinessListBase, I get the following exception:

System.InvalidOperationException: No method 'OrderBy' on type 'System.Linq.Queryable' is compatible with the supplied arguments.  
   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.Ordered(IQueryable source) in c:\Builds\WPF_Scrum\WPF_Team\Sources\Development\WPF\Data\Collections\QueryableExtensions.cs:line 88  
   at Telerik.Windows.Data.RecordTreeBuilder`1.GetDistinctValues(String fieldName) in c:\Builds\WPF_Scrum\WPF_Team\Sources\Development\WPF\Data\Data\RecordTreeBuilder.cs:line 185  
   at Telerik.Windows.Data.RecordManager.GetDistinctValues(String fieldName) in c:\Builds\WPF_Scrum\WPF_Team\Sources\Development\WPF\Data\Data\RecordManager.cs:line 294  
   at Telerik.Windows.Controls.GridView.FilteringDropDown.PopulateDistinctValues() in c:\Builds\WPF_Scrum\WPF_Team\Sources\Development\WPF\GridView\GridView\Filtering\FilteringDropDown.cs:line 541  
   at Telerik.Windows.Controls.GridView.FilteringDropDown.DropDownPopupOpened(Object sender, EventArgs e) in c:\Builds\WPF_Scrum\WPF_Team\Sources\Development\WPF\GridView\GridView\Filtering\FilteringDropDown.cs:line 470  
   at System.Windows.FrameworkElement.RaiseClrEvent(EventPrivateKey key, EventArgs args)  
   at System.Windows.Controls.Primitives.Popup.OnOpened(EventArgs e)  
   at System.Windows.Controls.Primitives.Popup.CreateWindow(Boolean asyncCall)  
   at System.Windows.Controls.Primitives.Popup.OnIsOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)  
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)  
   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, OperationType operationType)  
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)  
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)  
   at System.Windows.Controls.Primitives.Popup.set_IsOpen(Boolean value)  
   at Telerik.Windows.Controls.GridView.FilteringDropDown.OnIsDropDownOpenChanged(Boolean oldValue, Boolean newValue) in c:\Builds\WPF_Scrum\WPF_Team\Sources\Development\WPF\GridView\GridView\Filtering\FilteringDropDown.cs:line 251  
   at Telerik.Windows.Controls.GridView.FilteringDropDown.OnIsDropDownOpenChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) in c:\Builds\WPF_Scrum\WPF_Team\Sources\Development\WPF\GridView\GridView\Filtering\FilteringDropDown.cs:line 126  
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)  
   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, OperationType operationType)  
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)  
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)  
   at Telerik.Windows.Controls.GridView.FilteringDropDown.set_IsDropDownOpen(Boolean value) in c:\Builds\WPF_Scrum\WPF_Team\Sources\Development\WPF\GridView\GridView\Filtering\FilteringDropDown.cs:line 108  
   at Telerik.Windows.Controls.GridView.FilteringDropDown.DropDownButtonClick(Object sender, RoutedEventArgs e) in c:\Builds\WPF_Scrum\WPF_Team\Sources\Development\WPF\GridView\GridView\Filtering\FilteringDropDown.cs:line 486  
   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 System.Windows.Controls.Primitives.ButtonBase.OnClick()  
   at System.Windows.Controls.Primitives.ToggleButton.OnClick()  
   at System.Windows.Controls.Primitives.ButtonBase.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) 

I tried a lot of things only to come to the conclusion that this (hopefully) is a bug in the RadGridView.

Any suggestions whether I'm wrong or if this is already known and maybe solved in a new release?

Thanks in advance.

Rossen Hristov
Telerik team
 answered on 01 May 2009
1 answer
310 views
Hi 

I'm working with the WPF controls and trying to build an application to display call data on a screen.

My screen has 2 charts, the first of which is a line graph showing call volume over time.   In this, I add a new data point to a series as the day progresses - this works OK.

The second chart is a summary of all calls by a business area.   Therefore, it is possible that all the data points on this chart could change.  Therefore I would either need to refresh or remove and add the data points.  I cannot find anything in documentation or examples to suggest how this could be done.

There seems to be a Remove() method on the DataSeries object, but this takes a DataPoint object - so therefore I wrote code to enumerate the data points in a series and attempt to remove them :

    
        
           DataSeries inboundBarSeries = new DataSeries(); 
            DataSeries outboundBarSeries = new DataSeries(); 
            inboundBarSeries.Definition = new BarSeriesDefinition(); 
            outboundBarSeries.Definition = new BarSeriesDefinition(); 
            inboundBarSeries.Label = "Inbound"
            outboundBarSeries.Label = "Outbound"
            skillBarChart.DefaultView.ChartArea.DataSeries.Add(inboundBarSeries); 
            skillBarChart.DefaultView.ChartArea.DataSeries.Add(outboundBarSeries); 
           
            
        } 
        public void PopulateSkillChart() 
        { 
 
             
 
            foreach(DataPoint dp in skillBarChart.DefaultView.ChartArea.DataSeries[0]) 
            { 
                skillBarChart.DefaultView.ChartArea.DataSeries[0].Remove(dp); 
            } 
 
            DataSeries inboundBarSeries = skillBarChart.DefaultView.ChartArea.DataSeries[0]; 
            DataSeries outboundBarSeries = skillBarChart.DefaultView.ChartArea.DataSeries[1]; 
            this.loadInboundSkillChart(inboundBarSeries, outboundBarSeries); 
          
        } 
 
 

The first chunk of code runs once when the screen is initialised, and adds the empty series to the chart.  The PopulateSkillChart code then runs on a periodic basis and is intended to remove the data points and re-add them.  However this code fails with "Collection was modified; enumeration operation may not execute." when I try and execute it.

Would this be recommended as a way to refresh the data set or is there an easier method which I am missing?

I would appreciate your help on this.

Thanks

Richard

Vladimir Milev
Telerik team
 answered on 01 May 2009
1 answer
139 views
How can I set the initial zoom level of the 3d chart?  In my situation, the 3D pie chart fills only a small fraction of the available space available.  The user can't interact with the chart, so it needs to happen when the chart gets created.

Thanks
Greg
Dwight
Telerik team
 answered on 30 Apr 2009
1 answer
224 views
The bottom of the text strings in my pie chart legend is being cut off....  Not sure why since I am just using the basic styles.

XAML

            <telerik:RadChart x:Name="ProgressChart"
                              Margin="4,8,4,4"
                              VerticalAlignment="Stretch"
                              HorizontalAlignment="Stretch">
                <telerik:RadChart.Background>
                    <SolidColorBrush Color="Transparent"/>
                </telerik:RadChart.Background>
            </telerik:RadChart>

Code Behind

            ProgressChart.Visibility = Visibility.Visible;
            ProgressChart.DefaultView.ChartArea.DataSeries.Clear();

            var areaSeries = new DataSeries {Definition = new PieSeriesDefinition()};

            areaSeries.LegendLabel = "test";
            areaSeries.Definition.ShowItemLabels = true;

            areaSeries.Add(new DataPoint(_dataList.Completed, _dataList.Completed));
            areaSeries.Add(new DataPoint(_dataList.Incomplete, _dataList.Incomplete));

            areaSeries[0].LegendLabel = "Completed";
            areaSeries[1].LegendLabel = "Incomplete";
            ProgressChart.DefaultView.ChartArea.DataSeries.Add(areaSeries);


Giuseppe
Telerik team
 answered on 30 Apr 2009
1 answer
111 views
Is there any good sample application or posting i can use to see how i should start an edit, delete and insert command on a grid using custom buttons?
Missing User
 answered on 29 Apr 2009
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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?