Telerik Forums
UI for WPF Forum
1 answer
118 views
Hi,
I'm implementing self reference hierarchy using a property relation to a collection of the parent type.
How can I show in the child template the same columns that appear in the parent grid?
I would like to copy the parent grid columns to the child grid.

thanks,
Noam
Vlad
Telerik team
 answered on 02 Aug 2010
2 answers
160 views
I'm trying to change the fontstyle of the a radTreeviewItem. In fact, I want to do this within the code when events are fired. I've tried to add a stackpanel with a textblock in the header but it doesn't seems to work. I've also tried this code:
TextElement.SetFontStyle(treeViewItem, FontStyles.Italic);
without success.

Can you tell me how I could change the font dynamically ?

Thanks
Jean-Francois
Top achievements
Rank 1
 answered on 02 Aug 2010
6 answers
74 views
We use MVVM.  The following code is working fine when using the RadControl Q1 2010. 
<TabControl ItemsSource="{Binding StandardTimeSlotTabs}" SelectedIndex="{Binding StandardSelectedTabIndex, Mode=TwoWay}" >
    <TabControl.ContentTemplate>
    <DataTemplate>          
           <controls:RadGridView ShowColumnFooters="True" ScrollViewer.CanContentScroll="True" 
ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" IsReadOnly="True"  AutoGenerateColumns="False" GridLinesVisibility="None"  ItemsSource="{Binding StandardTimeSlotItems}" 
CurrentItem="{Binding DataContext.SelectedStandardTimeSlotItem, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type vw:OrderEntrySchedulingStandardFieldView}}}"
SelectedItem="{Binding DataContext.SelectedStandardTimeSlotItem, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type vw:OrderEntrySchedulingStandardFieldView}}}"
>        
        <controls:RadGridView.Columns> blah </controls:RadGridView.Columns>
 </DataTemplate>   
   </TabControl.ContentTemplate>  
  </TabControl>

The SelectedItem is bound to a RelativeSource, the Setter and Getter for DataContext.SelectedStandardTimeSlotItem are working fine when row selection changes.

After we updated to Q2 2010, the row selection changes will not fire the Setter of DataContext.SelectedStandardTimeSlotItem, but the getter was callled when the control is loaded.  if I put a stop point in the SelectChanged event, the Selecteditem is changed when the row selection is changing.  It seems the RelativeSource works for the getter, but not when the selection is changed.  Is it a bug or I missed something?   Keep in mind it worked fine in Q1, nothing else is changed.

Thanks!

Amy
Milan
Telerik team
 answered on 02 Aug 2010
1 answer
111 views
Hello,

I downloaded and installed the trial version of the controls as I want to evaluate them.  I see lots of rad controls in my toolbox now.  Walking through a tutorial the very first thing I do is search on RadDocking and it is not there.  The RadDockPanel is there.  Any thoughts on what the problem may be.  The Docking.dll is in the Binaries/WPF folder.

Thanks,

Jason
Jason
Top achievements
Rank 1
 answered on 02 Aug 2010
3 answers
110 views
Hi,

A pane is always showing is visibile even when the content is not.  Or maybe I am confused how the is visible works.

Assuming we have two tabs (Tab1 on the front Tab2 on the back):

The pane in Tab1 content is visible and Tab2 content is not.  I can drag Tab2 out of the docking and now both should be visible.  Is there a way to get the visibility information   How can I get the visiblity of the content using the panes?

Maybe something like IsContentVisible? or IsHeaderVisible?

J
George
Telerik team
 answered on 02 Aug 2010
2 answers
108 views
I'm still very new to Telerik and still getting to know all the ins and outs of the controls.  What I'm doing is implementing a simple grouping mechanism to simulate a property grid.

XAML:

<telerik1:RadGridView Name="ParametersGridView"
                      CanUserDeleteRows="False"
                      CanUserInsertRows="False"
                      IsReadOnly="False"
                      AutoExpandGroups="True"
                      ShowGroupPanel="False"
                      ShowColumnHeaders="False"
                      AutoGenerateColumns="False"
                      HorizontalContentAlignment="Stretch"
                      HorizontalAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      RowLoaded="ParametersGridView_RowLoaded">
      
    <telerik1:RadGridView.GroupDescriptors>
        <telerikData:GroupDescriptor Member="Category"
                                     SortDirection="Ascending" />
    </telerik1:RadGridView.GroupDescriptors>
      
    <telerik1:RadGridView.Resources>
        <DataTemplate x:Key="GridToolTip">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="{Binding Description}" 
                           MaxWidth="300"
                           TextWrapping="Wrap" />
            </StackPanel>
        </DataTemplate>
    </telerik1:RadGridView.Resources>

    <telerik1:RadGridView.Columns>
        <telerik1:GridViewDataColumn Header="Parameter"
                                     DataMemberBinding="{Binding DisplayName}"
                                     Width="150"
                                     IsReadOnly="True" />
        <my:ConfigDataColumn Header="Value"
                              DataMemberBinding="{Binding Value,Mode=TwoWay}"
                              Width="300"
                              IsReadOnly="False" />
        <telerik1:GridViewDataColumn Header="Category"
                                     DataMemberBinding="{Binding Category}"
                                     IsReadOnly="True"
                                     IsVisible="False" />
    </telerik1:RadGridView.Columns>
</telerik1:RadGridView>

I load up the RadGridView.ItemsSource in the control's Loaded event.  When I run it, everything works just fine as expected.  However, when I try to view my control in the VS designer, I get a System.ArgumentException stating:"Invalid property or field - 'Category' for type: Customer".

First of all, I don't know where the "Customer" is coming from, there's no such class/object in my code.  Secondly, is this exception normal since I load my data at runtime?

...Glenn
Glenn
Top achievements
Rank 2
 answered on 02 Aug 2010
2 answers
147 views
I was wondering if anyone has a nice strategy to re-use XAML column definitions, i.e. a GridViewDataColumn?

One way to do it is to create a class that inherits from GridViewDataColumn and set the various properties needed. However, this means you can't have any XAML and any custom CellTemplate will get messy.

If anyone has any ideas or links to resources that would help, please let me know!
Geoff Smith
Top achievements
Rank 1
 answered on 02 Aug 2010
1 answer
638 views
Hello,
I have numericUpDown in my project which valueFormat should be percentage
Here is my xaml code:

<telerik:RadNumericUpDown Grid.Row="1" Grid.Column="1" Name="VMDCR"
                                Value="{Binding Path=Tier.VMDCR,ValidatesOnDataErrors=True,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}"
                                IsEditable="True" AutoReverse="False" Minimum="0"
                   SmallChange="0.1" LargeChange="0.1" ValueFormat="Percentage" >

So when window with numericUpDown appears it's value is 0.00%
When i select all it's content and type here it's value becomes for example 34 , but after it loses focus the value is set to 3,400.00% but i expect that it would be 34.00%.
So, please, could you explain how can i achieve this? Why does the value multiply by 100 and how to avoid this behaviour?
Valeri Hristov
Telerik team
 answered on 02 Aug 2010
6 answers
205 views
I am facing a wierd problem which is showing up also on online WPF sample. I am using following code to populate hierarchy from same table. The grid shows child rows under the parent row and also as another parent row which is causing confusion. I do not want to show the records as parent rows if they have ParentTaskID property set.

 

 

 

 

<telerik:RadGridView.ChildTableDefinitions>
                <telerik:GridViewTableDefinition>
                    <telerik:GridViewTableDefinition.Relation >
                        <telerik:TableRelation IsSelfReference="True"     >
                            <telerik:TableRelation.FieldNames>
                                <telerik:FieldDescriptorNamePair  
                                    ParentFieldDescriptorName="TaskId" 
                                    ChildFieldDescriptorName="ParentTaskId" />
                            </telerik:TableRelation.FieldNames>
                        </telerik:TableRelation>
                    </telerik:GridViewTableDefinition.Relation>
                </telerik:GridViewTableDefinition>
            </telerik:RadGridView.ChildTableDefinitions>

Milan
Telerik team
 answered on 02 Aug 2010
1 answer
133 views
RadTreeListView is blowing up my extremely simple app right after I expand a collapsed node...  Come on Telerik - you're QA has been pretty #!$$ poor this release.  I've tried using your stuff at work and at home (separate licenses) and there are show-stopper bugs in both projects, different controls (RadTileView at work...ticket submitted, and now RadTreeListView at home) and yes I've tried the latest internal builds.  No Joy.  This is frustrating.  I'm probably dumping telerik for my home projects when my support contract expires in September.  My current client has purchased 7 licenses in the past week on my recommendations.  This doesn't make me look good.

Object reference not set to an instance of an object.   at Telerik.Windows.Controls.GridView.Automation.GridViewVirtualizingPanelAutomationPeer.GetChildrenCore() in c:\Builds\WPF_Scrum\Release_WPF_2010_Q2\Sources\Development\Controls\GridView\GridView\GridView\Automation\GridViewVirtualizingPanelAutomationPeer.cs:line 79
   at System.Windows.Automation.Peers.AutomationPeer.EnsureChildren()
   at System.Windows.Automation.Peers.AutomationPeer.GetChildren()
   at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
   at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
   at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
   at System.Windows.Automation.Peers.AutomationPeer.ValidateConnected(AutomationPeer connectedPeer)
   at System.Windows.Automation.Peers.AutomationPeer.AutomationPeerFromInputElement(IInputElement focusedElement)
   at System.Windows.Automation.Peers.AutomationPeer.RaiseFocusChangedEventHelper(IInputElement newFocus)
   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, Boolean forceToNullIfFailed)
   at System.Windows.Input.KeyboardDevice.Focus(IInputElement element)
   at System.Windows.UIElement.Focus()
   at System.Windows.Controls.Primitives.ButtonBase.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.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.RaiseTrustedEvent(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, WindowMessage 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, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   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()
   at ADD2Do.WPFClient.App.Main() in C:\sandbox\ADD2Do\trunk\ADD2Do.WPFClient\obj\x86\Debug\App.g.cs:line 0
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
Vlad
Telerik team
 answered on 02 Aug 2010
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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
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
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?