Telerik Forums
UI for WPF Forum
2 answers
93 views

Hello,

I encountered the following error while navigating through a radTreeView Control with LoadOnDemand enabled. The error appears randomly and it's not connected to bounded data model.

We can provide test project solution if you tell us a valid email address.

Thank you very much.

The error is:

Message:

Object reference not set to an instance of an object.   at Telerik.Windows.Controls.RadTreeViewItem.get_NonParentItems()
   at Telerik.Windows.Controls.RadTreeViewItem.OnIsExpandedChanged(Boolean oldValue, Boolean newValue)
   at Telerik.Windows.Controls.RadTreeViewItem.OnIsExpandedPropertyChanged(DependencyObject sender, 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 Telerik.Windows.Controls.RadTreeViewItem.set_IsExpanded(Boolean value)
   at Telerik.Windows.Controls.RadTreeViewItem.ExpanderElement_Click(Object sender, RoutedEventArgs e)
   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)
Rares Vasilescu
Top achievements
Rank 1
 answered on 12 Apr 2010
3 answers
234 views
I am working on a application for my current employer, Sikorsky Corp., that is using a collection of 5,338  datapoints that I am binding to a radchart to generate a line serie. The problem is that the Telerik radchart line graph is taking between 7sec - 30sec to render on a machine having a Intel Core 2 Duo CPU executeing at 3.16 GHz, and having 3GB of RAM with Windows XP operating system.  How can I get radchart to perform much better then it is now current performing?  Was radchart line graph capability implemented using straight vanilla  WPF DataTemplate and/or overriding the OnRender method?  If it was implemented using straight vanilla WPF and/or overriding the OnRender method then this would explain the poor performance when dealing with large number of DataPoints.  What will need to be done is to implement the radchart line graph capability using DrawingVisual.  Please see link below on how to use DrawingVisual to implement charts that can deal with very large number of datapoints.

This is the property that I am binding to:

public

 

ObservableCollection<DataPoint> DataPoints

 

{

 

        get

 

        {

 

                return dataPoints;

 

        }

 

        set

 

        {

                dataPoints =

value;

 

                OnPropertyChanged(

"DataPoints");

 

        }

}


I set the ItemsSource property of my telerik chart to this DataPoints property as so:

<

 

telerik:RadChart x:Name="linePlot"  ItemsSource="{Binding Path=DataPoints}" >

 

 

 

        <telerik:RadChart.DefaultView>

 

 

 

            <telerik:ChartDefaultView>

 

 

 

                    <telerik:ChartDefaultView.ChartTitle>

 

 

 

                            <telerik:ChartTitle />

 

 

 

                    </telerik:ChartDefaultView.ChartTitle>

 

 

 

                    <telerik:ChartDefaultView.ChartLegend>

 

 

 

                            <telerik:ChartLegend Width="0" />

 

 

 

                    </telerik:ChartDefaultView.ChartLegend>

 

 

 

                    <telerik:ChartDefaultView.ChartArea>

 

 

 

                            <telerik:ChartArea>

 

 

 

                                    <telerik:ChartArea.AxisY>

 

 

 

                                                <telerik:AxisY MajorGridLinesVisibility="Visible" MinorGridLinesVisibility="Visible" />

 

 

 

                                    </telerik:ChartArea.AxisY>

 

 

 

                                    <telerik:ChartArea.AxisX>

 

 

 

                                                <telerik:AxisX />

 

 

 

                                    </telerik:ChartArea.AxisX>

 

 

 

                            </telerik:ChartArea>

 

 

 

                   </telerik:ChartDefaultView.ChartArea>

 

 

 

            </telerik:ChartDefaultView>

 

 

 

        </telerik:RadChart.DefaultView>

 

 

 

        <telerik:RadChart.SeriesMappings>

 

 

 

                <telerik:SeriesMapping>

 

 

 

                        <telerik:SeriesMapping.SeriesDefinition>

 

 

 

                                  <telerik:LineSeriesDefinition />

 

 

 

                        </telerik:SeriesMapping.SeriesDefinition >

 

 

 

                        <telerik:SeriesMapping.ItemMappings>

 

 

 

                                <telerik:ItemMapping DataPointMember="YValue" 
                                                                  FieldName
="YPlotPoint" />

 

 

 

                                <telerik:ItemMapping DataPointMember="XValue" 
                                                                  FieldName
="XPlotPoint"  />

 

 

 

                        </telerik:SeriesMapping.ItemMappings>

 

 

 

                </telerik:SeriesMapping>

 

 

 

        </telerik:RadChart.SeriesMappings>

 

 

 

</telerik:RadChart>

 


Link to DrawingVisual:

http://msdn.microsoft.com/en-us/magazine/dd483292.aspx


Giuseppe
Telerik team
 answered on 12 Apr 2010
3 answers
80 views
Hello.

Like the title says, I need a notification when the drag and drop operation is finished and the dropped item has been moved to it's correct position, this is because I need the new position of the item.

I'm not using the native D&D in the RadTreeView, but I'm using the RadDragAndDropManager to handle my D&D. Also as I was told here that in order to handle the D&D on my own I have to set the e.Handled to true in the PreviewDragEnded event.

So basically I just need an event that happens after:

1) The drop has finished
2) The tree view has been rearranged to update the new position of the dropped item

At that point, I should be able to find the dropped item and call this to get its new coordinates (reference):

GeneralTransform generalTransform = droppedItem.TransformToVisual( parentElement );
Point childToParentCoordinates = generalTransform.Transform( new Point( 0, 0 ) );

Let me know if this is possible. Thanks!

Tina Stancheva
Telerik team
 answered on 12 Apr 2010
4 answers
191 views
Hello,

I am using RadGridView on my Window. On adding and Removing rows on RadGridView it start Flickering and not allow to work on it.
My grid have columns like:
1. RadDatePicker 
2.CheckBox
3.GridViewComboBoxColumn.
4. TextBox

Please help me how to stop this  Flickering  of Grid.
ritesh goyal
Top achievements
Rank 1
 answered on 12 Apr 2010
1 answer
128 views
Hi Telerik,

I was implementing the demonstration of loading/saving the GridView state from the demo application.
All worked well, the state was saved/loaded, except the GroupBy toolbar was not filled from the last state.

By implementing this.grid.UpdateLayout(); inside the Loadstate function solved my problem.

Is this the correct way?, Or should the example have worked 'out of the box'?

With kind regards,
Rob
Vlad
Telerik team
 answered on 12 Apr 2010
0 answers
105 views
Hello,

I am using RadGridView on my Window. On adding and Removing rows on RadGridView it start Flickering and not allow to work on it.
My grid have columns like:
1. RadDatePicker 
2.CheckBox
3.GridViewComboBoxColumn.
4. TextBox

Please help me how to stop this  Flickering  of Grid.

Sorry Posted in wrong column.....



ritesh goyal
Top achievements
Rank 1
 asked on 12 Apr 2010
1 answer
157 views
Hi,
i want to use the new Q1 2010 RadMap for WPF in a winforms project. Is this possible?
Can you give me a little step-by-step tutorial, because in my project i get no map.

I have use the same code in a wpf project, and there everything is alright.

Regards
Benjamin
Andrey
Telerik team
 answered on 12 Apr 2010
1 answer
132 views
Hi,
     I have a RadComboBox that is in a RadExpander which I have bound to a public property that returns a set of key value pairs.  I copied this same RadComboBox, renamed it, and placed it in a DataTemplate for a ListBox so when a User Selects the item in the ListBox the static text's visibility collapses and the editable fields are presented.  I am running into the problem where the RadComboBox doesn't bind.  The initial visibility of the RadComboBox is collapsed.  Any Ideas?
k f
Top achievements
Rank 1
 answered on 09 Apr 2010
2 answers
59 views
am using WPF rad controls trial version, i did a sample application and i deployed it. wen i run the application i cant see the application running. is it anything previliges like cannot deploy with trial version or something like that????
k f
Top achievements
Rank 1
 answered on 09 Apr 2010
1 answer
150 views
I had a problem with  Gauge  auto sizing.
When I assign the RadGauge control of width and height in NaN (the minimal width and height equal 0, VerticalAlignment and HorizontalAlignment – Center), I receive a control of 100 x 100 no matter what container I have (Grid, StackPanel, Canvas), though I expected to see the control of 0x0 size.
Can you tell me, why it happens? How can I avoid such situation and make auto sizing work correctly?
Andrey
Telerik team
 answered on 09 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?