Telerik Forums
UI for WPF Forum
5 answers
219 views
I have a CellEditTemplate that contains a UserControl composed of two comboboxes.  I wish to have the first combobox selected when I tab into the cell, then have the second combobox selected with the next tab. (Keyboard focus so that arrow keys can move through the items in the combobox)

Both comboboxes have their IsTabStop properties set to True.  The control in the CellEditTemplate (DataTemplate) has its IsTabStopProperty set to true.

How can I accomplish this?

Thank you in advance,
Scott Lee
Dimitrina
Telerik team
 answered on 05 Dec 2011
4 answers
305 views

Hello,

We just updated our telerik-controls to the latest version (2011 Q1). Now I am getting an exception when trying to use the gridview grouping.

This is the xaml for my gridview :

<telerik:RadGridView AutoExpandGroups="True" ShowColumnHeaders="False" 
                 ItemsSource="{Binding SelectedCategoryDataItems}"
                 CanUserFreezeColumns="False" CanUserReorderColumns="False" 
                 CanUserResizeColumns="False" 
                 EditTriggers="None" IsReadOnly="True" 
                 AutoGenerateColumns="False"
                 ActionOnLostFocus="None" RowIndicatorVisibility="Collapsed" 
                 ShowGroupPanel="False"  
                 HorizontalAlignment="Stretch" Grid.Column="1" 
                 RowStyle="{StaticResource GridItemStyle}"/>

The SelectedCategoryDataItems property is a QueryableCollectionView. The groupdescriptor is added from the viewmodel code-behind :

DataItems.GroupDescriptors.Add(new GroupDescriptor() { Member = "Status2" });

When I set AutoExpandGroups = True, the following exception is immediately thrown (application doesn't start) :
 
bij System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
bij System.ThrowHelper.ThrowArgumentOutOfRangeException()
bij System.Collections.Generic.List`1.get_Item(Int32 index)
bij System.Collections.ObjectModel.Collection`1.get_Item(Int32 index)
bij Telerik.Windows.Controls.GridView.GridViewGroupRow.OnIsExpandedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
bij System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
bij System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
bij System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
bij System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
bij System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
bij System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
bij Telerik.Windows.Controls.GridView.GridViewDataControl.RestoreItemValue(DependencyObject container, DependencyProperty property, Object item)
bij Telerik.Windows.Controls.GridView.GridViewDataControl.RestoreGroupPropeprties(GridViewGroupRow groupRow)
bij Telerik.Windows.Controls.GridView.GridViewDataControl.PrepareContainerForGroupItemOverride(DependencyObject element, Object item)
bij Telerik.Windows.Controls.GridView.BaseItemsControl.Telerik.Windows.Controls.GridView.IGeneratorHost.PrepareItemContainer(DependencyObject container, Object item)
bij Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.System.Windows.Controls.Primitives.IItemContainerGenerator.PrepareItemContainer(DependencyObject container)
bij Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.InsertContainer(Int32 childIndex, UIElement container, Boolean isRecycled)
bij Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.InsertNewContainer(Int32 childIndex, UIElement container)
bij Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.AddContainerFromGenerator(Int32 childIndex, UIElement child, Boolean newlyRealized)
bij Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size constraint)
bij System.Windows.FrameworkElement.MeasureCore(Size availableSize)
bij System.Windows.UIElement.Measure(Size availableSize)
bij System.Windows.ContextLayoutManager.UpdateLayout()
bij System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
bij System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
bij System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
bij System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
bij System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
bij System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
bij System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
bij System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
bij System.Windows.Threading.DispatcherOperation.InvokeImpl()
bij System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
bij System.Threading.ExecutionContext.runTryCode(Object userData)
bij System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
bij System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
bij System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bij System.Windows.Threading.DispatcherOperation.Invoke()
bij System.Windows.Threading.Dispatcher.ProcessQueue()
bij System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bij MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bij MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
bij System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
bij System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
bij System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
bij System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
bij System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
bij MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
bij MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
bij System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
bij System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
bij System.Windows.Threading.Dispatcher.Run()
bij System.Windows.Application.RunDispatcher(Object ignore)
bij System.Windows.Application.RunInternal(Window window)
bij System.Windows.Application.Run(Window window)
bij System.Windows.Application.Run()
bij Artemis.App.Main() in R:\WPF\Sln_Huisartsen\Sln_Huisartsen\obj\x86\Debug\App.g.cs:regel 0
bij System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
bij System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
bij Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
bij System.Threading.ThreadHelper.ThreadStart_Context(Object state)
bij System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bij System.Threading.ThreadHelper.ThreadStart()

Setting AutoExpandGroups to False gives the following exception in the output-window when I'm trying to expand a group from the UI :

System.Windows.Data Error: 8 : Cannot save value from target back to source. BindingExpression:Path=IsExpanded; DataItem='GridViewGroupRow' (Name=''); target element is 'ToggleButton' (Name='HeaderButton'); target property is 'IsChecked' (type 'Nullable`1') ArgumentOutOfRangeException:'System.ArgumentOutOfRangeException: De index valt buiten het bereik. Deze mag niet negatief zijn en moet kleiner zijn dan de grootte van de verzameling.
Parameternaam: index
   bij System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   bij System.ThrowHelper.ThrowArgumentOutOfRangeException()
   bij System.Collections.Generic.List`1.get_Item(Int32 index)
   bij System.Collections.ObjectModel.Collection`1.get_Item(Int32 index)
   bij Telerik.Windows.Controls.GridView.GridViewGroupRow.OnIsExpandedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   bij System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   bij System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   bij System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   bij System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
   bij System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
   bij System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   bij MS.Internal.Data.PropertyPathWorker.SetValue(Object item, Object value)
   bij MS.Internal.Data.ClrBindingWorker.UpdateValue(Object value)
   bij System.Windows.Data.BindingExpression.UpdateSource(Object value)'

Any ideas / advice on this?

Thanks in advance!
Vlad
Telerik team
 answered on 05 Dec 2011
2 answers
83 views
I have a WPF gridview in which I specify the datacolumns and load the data simply with (C#)::

gridFeeEarnerGroups.ItemsSource = Bill.FeeEarnerGroups;

"FeeEarnerGroups" is of type List<FeeEarnerGroup> and this works fine.

I need a sub table to use the data from FeeEarnerGroup.RateSets which is of type List<RateSet> , showing each (0 or more) RateSet per FeeEarnerGroup row.

I've looked at the documentation and tried a few things but I'm struggle to get this working.
Can anyone help please?





Steve
Top achievements
Rank 1
 answered on 04 Dec 2011
4 answers
94 views
I found that the default RadDocking.SaveLayout and LoadLayout functionality was not sufficient for my needs so I created a bunch of custom serializable classes that I populate from the RadDocking control. Initially this worked out for me but then I tested a scenario with a floating pane and could not get access to it. The RadDocking.Items collection only returns docked RadSplitContainers and the RadDocking.ToolWindows collection is a private field so I cannot access it from my code. Is there any way to access the ToolWindows in a RadDocking control so I can serialize them myself? If not would it be possible to get a public readonly property that returns an IEnumerable(Of ToolWindow) from the ToolWindows field? Alternatively, the RadDocking.Items collection would ideally contain the DocumentHost, docked SplitContainers and floating ToolWindows but I doubt that would be easily changed.
Jason
Top achievements
Rank 1
 answered on 02 Dec 2011
3 answers
396 views

Hi,

I would like to know if it's possible to have a RadRichText with a toolbar that containing only 3 buttons, bold, italic and underline. All of these buttons shoud have an impact direct on the text.

I need something like:

 

<

 

Window x:Class="WpfApplication3.Window1"

 

 

 

 

 

 

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

 

 

 

 

 

 

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

 

 

 

 

 

 

xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"

 

 

 

 

 

 

Title="Window1" Height="300" Width="641">

 

 

 

 

 

 

 

<Grid>

 

 

 

 

 

 

 

<Grid.RowDefinitions>

 

 

 

 

 

 

 

<RowDefinition Height="Auto"/>

 

 

 

 

 

 

 

<RowDefinition Height="*"/>

 

 

 

 

 

 

 

<RowDefinition Height="Auto"/>

 

 

 

 

 

 

 

</Grid.RowDefinitions>

 

 

 

 

 

 

 

 

<StackPanel Orientation="Horizontal">

 

 

 

 

 

 

 

<telerik:RadRibbonToggleButton Text="Bold" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ToggleBoldCommand}" />

 

 

 

 

 

 

 

<telerik:RadRibbonToggleButton Text="Italic" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ToggleItalicCommand}" />

 

 

 

 

 

 

 

<telerik:RadRibbonToggleButton Text="Underline" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ToggleUnderlineCommand}" />

 

 

 

</StackPanel>

 

 

 

<telerik:RadRichTextBox Grid.Row="1" x:Name="editor" Margin="24 24 0 0" AllowDrop="True" ShowComments="True" IsSelectionMiniToolBarEnabled="False" IsContextMenuEnabled="False" />

 

 

 

 

 

 

 

<telerik:DocumentRuler AssociatedRichTextBox="{Binding ElementName=editor, Mode=OneTime}" Grid.Row="1" />

 

 

 

 

 

 

 

<telerik:RadRichTextBoxStatusBar Grid.Row="2" AssociatedRichTextBox="{Binding ElementName=editor, Mode=OneTime}" />

 

 

 

 

 

 

 

</Grid>

 

</

 

Window>

 

Iva Toteva
Telerik team
 answered on 02 Dec 2011
1 answer
604 views
Is there a way to get the RadSplitContainter to fill the available space?  I have several split containters and the the last one, I want the RadPane's to fill what space is left.  Thanks.

<telerik:RadDocking  BorderThickness="0" Padding="0" Grid.Row="1" >             
    <telerik:RadSplitContainer Orientation="Horizontal" InitialPosition="DockedBottom">                 
        <telerik:RadPaneGroup >                     
            <telerik:RadPane Header="Development Log" Content="" />                 
        </telerik:RadPaneGroup>             
    </telerik:RadSplitContainer>            
    <telerik:RadSplitContainer Orientation="Horizontal" InitialPosition="DockedLeft" >                 
        <
telerik:RadPaneGroup  telerik:ProportionalStackPanel.RelativeSize="200, 300">                     
            <telerik:RadPane Header="Administration" Content="" IsPinned="True" />                 
        </telerik:RadPaneGroup>             
    </telerik:RadSplitContainer>                
    <telerik:RadSplitContainer Orientation="Horizontal" InitialPosition="DockedRight" MinWidth="300">                 
        <telerik:RadPaneGroup >                     
            <telerik:RadPane Header="Maintenance Plans"  />                 
        </telerik:RadPaneGroup>             
    </telerik:RadSplitContainer>             
    <!--<telerik:RadDocking.DocumentHost >-->
                
        <telerik:RadSplitContainer Orientation="Vertical" InitialPosition="DockedLeft"  MinWidth="200" HorizontalContentAlignment="Stretch" HorizontalAlignment="Stretch">                     
            <telerik:RadPaneGroup  >                         
                <
telerik:RadPane Header="Reference Materials" Content=""  />                     
            </telerik:RadPaneGroup>                     
            <telerik:RadPaneGroup >                         
                <telerik:RadPane Header="Maintenance Items" Content="" />                     
            </
telerik:RadPaneGroup>                 
        </telerik:RadSplitContainer>             
    <!--</telerik:RadDocking.DocumentHost>-->         
</telerik:RadDocking>

Konstantina
Telerik team
 answered on 02 Dec 2011
3 answers
113 views
     Hi,

I hava a problem about RadTreeListView columns. I can show some columns to users in like Hierarchical Data.
everthings is ok. and then i add a coloumn and want to create a textbox put it in last column

  column1      column2     column3
some data   some data    TextBox

---------------------------

  <telerik:RadTreeListView  IsDragDropEnabled="True" IsDragTooltipEnabled="False" x:Name="treeListView" IsFilteringAllowed="False"  
                                  ItemsSource="{Binding TheTree}"  AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,120,5,32"
                                  CanUserFreezeColumns="False" CanUserReorderColumns="False" MinHeight="300" MaxHeight="500" RowIndicatorVisibility="Collapsed" >
            <telerik:RadTreeListView.ChildTableDefinitions>
                <telerik:TreeListViewTableDefinition  ItemsSource="{Binding ChildNodes}" />
            </telerik:RadTreeListView.ChildTableDefinitions>
            <telerik:RadTreeListView.Columns>
 
                <telerik:GridViewDataColumn  DataMemberBinding="{Binding Entity.MalKod}" Header="Mal Kodu"  IsReadOnly="True"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Entity.MalAdi}" Header="Mal Adı"  IsReadOnly="True"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Entity.OlcuAd}" Header="Ölçü"  IsReadOnly="True"/>
                
               // i want to add textbox other column.
               //<TextBox Name="textBox1" VerticalAlignment="Top" Width="120" />
               //GIVES ERROR               

            </telerik:RadTreeListView.Columns>
            
               
        </telerik:RadTreeListView>


   How can i do that. Ofcourse i can use gridview but my data is Hierarchical so i have to show like tree


Vera
Telerik team
 answered on 02 Dec 2011
1 answer
120 views
Are there any plans to port the PdfViewer-Control from Silverlight to WPF?
Kammen
Telerik team
 answered on 02 Dec 2011
1 answer
110 views
When using RadTextBox, we can export documents to Pdf. Very good!

But... how about exporting to PDF / A?
Iva Toteva
Telerik team
 answered on 02 Dec 2011
2 answers
84 views
Hello,

the Transparent Theme seems to behave different then the Metro Theme. This behavior changed in Q3. Could you fix this? Thanks.

Greetings,
Ronny
Dimitrina
Telerik team
 answered on 02 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?