Telerik Forums
UI for WPF Forum
1 answer
148 views
I am using the wpf treegrid and want to be able to drag only certain items into only certain drop targets within the tree.

I noticed all of the querycontinue and other Wpf drag drop events do not fire at all so the only option I have to choose if a target is valid or not is what the documentation references: the IsDropAllowed property on the RadTreeItem itself.

the problem with this is all it does is suppress the preview from actually moving the item in the tree. I need to be able to change the drag icon to some sort of indicator saying the target is invalid. Just like WPF allows with its DragEventArgs.Effects = DragDropEffects.None

any help is very much appreciated. It seems rediculous to recurse through the entire tree on every DragStarted eventHandler and set the isDropAllowed to true or false for each node. But even if that is the only acceptable method for some strange reason, it should at least work and change the cursor to an (X)
Valentin.Stoychev
Telerik team
 answered on 25 Nov 2008
2 answers
223 views
Hi,

I was wondering if it is possible to remove the blue mouse-over effect that appears on the content area of a RadPanelBarItem. I can override the colours for this effect on the header of this control, but can't find a way to remove or disable it on the content area. I am currently using the 2008 Q2 SP1 release of RadControls for WPF.

Thanks in advance,

Craig.
Craig
Top achievements
Rank 1
 answered on 24 Nov 2008
1 answer
244 views
Is there a way to accomplish loading data on demand with WPF GridView?
That means gridview should ask me how much DataItems to render to show an appropriate scrollbar.
Then when you scroll dataitems into view,  GridView fires an event, where in I can load only that data that is visible.
I not only need UI virtualization but rather data virtualization.
If not, does GridView support paging like asp.net Gridview?
Rosi
Telerik team
 answered on 21 Nov 2008
3 answers
233 views
Hi,

I've update to the last version but now i have 2 problems with it
  1. When i get the gridviewcell from a dependancy object and then try to get the field property (what existed in the previous versions), it doesn't exist anymore ? (the code comes from a datacombo selection changed in the grid)
     DependencyObject item = e.OriginalSource as DependencyObject;  
     while (!(item is GridViewCell))  
     {  
         item = VisualTreeHelper.GetParent(item);  
     }  
     
     
     
     if ((sender as ComboBox).SelectedItem != null)  
     {  
        PrinterTray p = (sender as ComboBox).SelectedItem as PrinterTray;  
                            QueueItem q = ((item as GridViewCell).Field.Record as DataRecord).Data as QueueItem;  
                            q.SetPrinterTrayKeys(p.ReportServiceId, p.PrinterId, p.PrinterTrayId);  
     } 
  2. When i add a column that is set to a nested object then it doesn't work anymore (worked fine in the previous versions) but now it doens't display anything. (QueueItem.Status.StatusId)
    <telerik:GridViewDataColumn Width="Auto" DataType="{x:Null}" HeaderText="StatusId" UniqueName="QueueItem.Status.StatusId" /> 

 

Pavel Pavlov
Telerik team
 answered on 21 Nov 2008
1 answer
261 views
Dear All

We are using an editable row within a RadGridView and the RadGridView appears to be hooking the PreviewKeyDown or KeyDown event and changing the focussed element in the visual tree when the down arrow key is pressed anywhere inside the grid.  This manifests itself as focus shifting away from, say, a text box when we press the down arrow key in it.

Something along the top edge of the grid is receiving focus when we do this, but we can't identify this thing when we use Snoop.  We're just seeing a dotted line above the column header row in the grid.

Can you check the code and see what's going on?  Our editable row is used elsewhere in the app outside of a grid and pressing key down in a text box has no effect.

Regards

Chris Smith
Pavel Pavlov
Telerik team
 answered on 21 Nov 2008
1 answer
160 views
I would like to request a feature where you can set a minimum date and a maximum date on the DatePicker control. Ideally this would be a dependency property so that you could bind to it.
Hristo
Telerik team
 answered on 21 Nov 2008
1 answer
140 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
449 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
216 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
103 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
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
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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?