Telerik Forums
UI for WPF Forum
1 answer
129 views
there is a bug in drag/drop within the treeView.
here's the scenario:

-A
--B
---C

each letter is a RadTreeViewItem. A is root, B is a child of A, C is a child of B.

Now, A.IsDropAllowed=true, B.IsDropAllowed=False,

I want to move C before B, thus making it a child of A. BUT when the line indicator shows that the item will be dropped "Before B" the tooltip shows up as (X), and does not allow the drop.

Setting a dropTarget to isDropAllowed=False should mean you cannot drop it under that item. If i want to add something before or after it, it should use the isDropAllowed of that item's parent.
Valentin.Stoychev
Telerik team
 answered on 20 Nov 2008
10 answers
420 views

Version: Q2 2008 SP1- Released:9/10/2008 - WPF/VS2008-SP1

 

We're able to edit an existing record, but couldn't successfully include a record into the GridView. Our data is stored in a List<T> which is used to commit each record to the backend.

 

Pressing the INSERT key on the GridView will call the 'AddingNewDataItem' method.  When the cursor leaves the edited row, the 'EditEnded' method is called.  When this method executes to the end, an error occurs:

 

ERROR: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

STACK TRACE: at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at System.ThrowHelper.ThrowArgumentOutOfRangeException()
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at Telerik.Windows.Data.Grouping.DataRecordStore`1.GetDataRecord(Int32 index)
   at Telerik.Windows.Data.Grouping.ListOfRecordsExtensions.InsertIndex[TElement](IList`1 recordList, Int32 insertionIndex, Int32 dataSourceIndex, DataRecordStore`1 recordStore)
   at Telerik.Windows.Data.RecordTreeBuilder`1.InsertRecordInGroup(IList`1 dataRecordList, TElement dataItem, Int32 index)
   at Telerik.Windows.Data.RecordTreeBuilder`1.AddExistingDataRecord(IList`1 targetCollection, TElement dataItem, Int32 index)
   at Telerik.Windows.Data.RecordTreeBuilder`1.AddNewDataRecord(IList`1 targetCollection, TElement dataItem, Int32 index)
   at Telerik.Windows.Data.RecordTreeBuilder`1.AddNewRecord(IList`1 targetCollection, Object recordItem, Int32 index)
   at Telerik.Windows.Data.RecordManager.AddNewRecord(Object recordItem, Int32 index, String fieldName)
   at Telerik.Windows.Controls.GridView.GridViewRow.UpdateDataRecords(DataRecord changedRecord, String changedFieldName, RecordsChangeListener changeListener)
   at Telerik.Windows.Controls.GridView.GridViewRow.HandleValueChangedWithoutNotifications(DataRecord changedRecord, String changedFieldName, RecordsChangeListener changeListener)
   at Telerik.Windows.Controls.GridView.GridViewRow.HandleValueChangedAfterEdit(FieldRoutedEventArgs editEventArgs, RecordsChangeListener changeListener)
   at Telerik.Windows.Controls.GridView.GridViewRow.Cell_EditCommitted(Object sender, FieldRoutedEventArgs e)
   at Telerik.Windows.Controls.GridView.GridViewRow.CommitEdit()
   at Telerik.Windows.Controls.GridView.GridViewCell.CommitEditedRow()
   at Telerik.Windows.Controls.GridView.GridViewCell.TryCommitPreviousEdit()
   at Telerik.Windows.Controls.GridView.GridViewCell.HandleLostFocus()
   at Telerik.Windows.Controls.GridView.GridViewCell.OnGotFocus(RoutedEventArgs e)
   at System.Windows.UIElement.IsFocused_Changed(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(DependencyPropertyKey key, Object value)
   at System.Windows.Input.FocusManager.OnFocusedElementChanged(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.Input.FocusManager.SetFocusedElement(DependencyObject element, IInputElement value)
   at System.Windows.Input.KeyboardNavigation.UpdateFocusedElement(DependencyObject focusTarget)
   at System.Windows.FrameworkElement.OnGotKeyboardFocus(Object sender, KeyboardFocusChangedEventArgs e)
   at System.Windows.Input.KeyboardFocusChangedEventArgs.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.KeyboardDevice.ChangeFocus(DependencyObject focus, Int32 timestamp)
   at System.Windows.Input.KeyboardDevice.TryChangeFocus(DependencyObject newFocus, IKeyboardInputProvider keyboardInputProvider, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)
   at System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew)
   at System.Windows.Input.KeyboardDevice.Focus(IInputElement element)
   at System.Windows.Input.Keyboard.Focus(IInputElement element)
   at Telerik.Windows.Controls.GridView.GridViewCell.OnMouseLeftButtonDown(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonDownThunk(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.OnMouseDownThunk(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()

 

Record editing is working, but crashes when committing a new record.  Secondly, is it possible to call the 'AddingNewDataItem' method rather than wait for the user to press the INSERT key?

 

-Trav.

Hristo Deshev
Telerik team
 answered on 20 Nov 2008
3 answers
188 views
Should be a simple question....  How do I change the background color of a chart?

These don't seem to do it for me:

this

 

.RadChart1.Background = new SolidColorBrush(Colors.Blue);

 

this

 

.RadChart1.DefaultView.ChartArea.Background = new SolidColorBrush(Colors.Black);

The only way I have done it so far is to override the whole control template, and set the Background on the WrapPanel....which is very much over-kill.  I must be missing something obvious.  If you want to change the background color of a control, you usually just set the Background property...

Michael

 

Michael
Top achievements
Rank 1
 answered on 11 Nov 2008
1 answer
89 views
We would like to welcome you to the Telerik RadControls for WPF and RadControls for Silverlight Early Adoption Program!

As part of the Early Adoption Program we would like to reward all community members who are eager to try our newest products – RadControls for Silverlight and/or RadControls for WPF. Your feedback and feature suggestions will be instrumental in helping us further develop the products so that they meet your requirements.  Your ideas and suggestions will be rewarded according to the scheme below:

  • Bug Report – 1000-2000 Telerik points
  • Feature Request – depending on how valuable the feature request is and whether it can be implemented or not – 500 – 2000 Telerik points
  • Showcase example –a real-life example showing the usage of our RadControls for Silverlight/RadControls for WPF. All we need is just an URL pointing to an application or screen-shots/source code demonstrating the usage of the controls – 1000-5000 Telerik points
  • General Feedback – 500-1500 Telerik points

Telerik points will be updated in your Client.NET accounts and you will receive a separate e-mail once Telerik points are added for your feedback. You can use the accumulated Telerik points as a discount for future purchases of RadControls for Silverlight, RadControls for WPF or another Telerik product. 100 Telerik points equal $1 discount on Telerik products.

For those of you who are most active and submit the most valuable feedback, we also have additional prizes - three $100 Amazon Gift Coupons!

The Early Adoption Program will be open until November 1, 2008. Your product suggestions and ideas are highly appreciated!
Nikolay
Telerik team
 answered on 10 Nov 2008
2 answers
73 views
Hello

I know this is going to sound stupid, but I was wondering if anyone could explain in a simple walkthrough on how to use the RadPanel Bar in Microsoft Expression Blend 2.

I'm a super noob as you can tell.  thank you in advance
Ken
Top achievements
Rank 1
 answered on 07 Nov 2008
3 answers
197 views
Dear All

I've just spent a while trying to get a hand-authored theme (basically identical to SimpleTheme, but in my assembly) to work with the grid, but without success.

I can reference the SimpleTheme class in Telerik.Windows.Controls.UI.Simple and my grid reflects this theme, but if I copy the theme into my project (after fixing up namespaces etc.) and setting the Theming.Theme attached property on the grid to point to my derived class of Theme, I end up with a completely blank grid.

I have two ideas as to why this is happening:
- Assemblies containing themes authored by Telerik are signed with a strong name key
- The syntax I am using to set up the ThemeResourceKey that points a particular style at a particular part of the grid is incorrect.  The following example is from Telerik code:

x:Key="{telerik:ThemeResourceKey ThemeType=telerik:SummerTheme, ElementType=grid:GridViewItemsControl}"

and I'm a bit surprised that ThemeType is assigned like this using just a string.  I've done the same, using the namespace of the class I have which is derived from Theme, but without success.

Can you provide us with a step-by-step guide to hand authoring themes for the Grid, or is this currently not possible?

In the meantime, we are going to continue styling the grid without unifying this into a Theme.

Regards

Chris
Atanas
Telerik team
 answered on 07 Nov 2008
4 answers
125 views
Hi,

I've addressed this issue before in this thread - Telerik's WPF controls don't initially support SQL Server Developer Edition (or other versions that don't support the user instance flag in connection strings).  I had forgotten about this issue when I downloaded the Q2 release, and was a little confused when I could get the demo to start without immediately crashing!  I know you don't have plans for native support of different SQL Server versions (which I still think would be nice), but I did see Hristo say in the other thread that "We will be shipping a .config file with the official version and the installer should handle the DB configuration for you."  I did see the .config file and just edited the settings through the property pages in Visual Studio.  However, the installer definitely messed up in configuring my database server.  Is there any chance that in future releases the installer will do this automatically?  It may seem like a small feature, but it would make your product seem a whole lot more professional if I didn't have to tweak the demo's configuration in order for it to run, and I'm sure everyone not using SQL Express would very much appreciate it :)  Let me know how feasible this might be for Q3!

Thanks so much,

UIdev
Atanas
Telerik team
 answered on 07 Nov 2008
1 answer
244 views
Hi,

I've implemented a chart with multiple areas (i get the percentages of the cpu's and add it to the chart data) but i have some problems:

  1. How can i add a fixed Y-axis (0-100 major tick 10 minor 5) because now it's dynamic (changes if value is greater or smaller then axis)
  2. How can i make the X-axis start at 0 because now i've got a gap between the first value and the Y-axis (because Y is always 1 as start)
  3. How can i remove the label on the points displaying the value

Code for populating the chart:

        DataSeries splineAreaSeriesCPU1 = null;  
        DataSeries splineAreaSeriesCPU2 = null;  
        public void fillProcessorChart()  
        {  
            splineAreaSeriesCPU1 = new DataSeries();  
            splineAreaSeriesCPU2 = new DataSeries();  
 
            splineAreaSeriesCPU1.Definition = new SplineAreaSeriesDefinition();  
            splineAreaSeriesCPU2.Definition = new SplineAreaSeriesDefinition();  
 
            ChartArea1.DataSeries.Add(splineAreaSeriesCPU1);  
            ChartArea2.DataSeries.Add(splineAreaSeriesCPU2);  
              
        }  
 
        public static void FillWithSampleData(DataSeries series, double PcValue)  
        {  
            series.Add(new DataPoint { XValue = series.Count() , YValue = PcValue });  
              
              
            if (series.Count()>10)  
                series.RemoveAt(0);  
        } 

XAml
                <telerik:RadChart x:Name="RadChart1" Margin="8,8,8,8" Grid.Row="3" Grid.Column="2"  UseDefaultLayout="False" VirtualizingStackPanel.VirtualizationMode="Recycling">  
                      
 
                    <Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch">  
                        <Grid.RowDefinitions> 
                            <RowDefinition Height="0.5*" /> 
                            <RowDefinition Height="0.5*" /> 
                        </Grid.RowDefinitions> 
                        <Grid.ColumnDefinitions> 
                            <ColumnDefinition Width="*" /> 
 
                        </Grid.ColumnDefinitions> 
 
 
                        <telerik:ChartArea Grid.Row="0" x:Name="ChartArea1" > 
                            <telerik:ChartArea.AxisY> 
                                <telerik:AxisY MajorGridLinesVisibility="Collapsed" 
                                               MinorTicksVisibility="Visible" 
                                               Title="CPU 1" /> 
                            </telerik:ChartArea.AxisY> 
                        </telerik:ChartArea> 
 
 
                        <telerik:ChartArea Grid.Row="1" x:Name="ChartArea2" > 
                            <telerik:ChartArea.AxisY> 
                                <telerik:AxisY MajorGridLinesVisibility="Collapsed" 
                                               MinorTicksVisibility="Visible" 
                                               Title="CPU 2" /> 
                            </telerik:ChartArea.AxisY> 
                        </telerik:ChartArea> 
 
 
                    </Grid> 
                </telerik:RadChart> 

Any ideas?
Ves
Telerik team
 answered on 06 Nov 2008
4 answers
858 views
Our designer would like us to have a grey row separator across the width of the grid.  At the moment, we can only do this as far right as the right edge of the last defined column.

Is there a way to achieve this?

(We are having a related issue with the mouse-over highlighting for a row.  We would like that to go to right edge of the grid as well.)

Regards

Chris Smith
Atanas
Telerik team
 answered on 06 Nov 2008
1 answer
91 views
Hi, I have editable cell in radGridView. When i write new value and click btn "Save" this cell not lose focus and i get old value in this cell.

Could you help me?
Atanas
Telerik team
 answered on 03 Nov 2008
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?