Telerik Forums
UI for WPF Forum
1 answer
217 views
Hi,

I have a button inside the RadExpander and have the command property as well. However I am getting the error in the output saying the command property is not found in my view model. I have set the relative source to the rad expander as well.

The thing is I have the button inside the Rad Expander header and have the command property and it is working perfectly.

I am using Prism Framework with MEF.

Please see below the code,

<telerik:RadExpander Grid.Row="0" Margin="5" >

<telerik:RadExpander.Header>

<Grid>

<telerik:RadButton Margin="0,0,10,0" Style="{DynamicResource RadImageButton}"

Command="{Binding Path=DataContext.CollapseCommand, RelativeSource={RelativeSource FindAncestor, AncestorType=telerikinput:RadExpander}}"

Visibility="{Binding Converter={StaticResource VisibilityConverter}, Path=IsHeaderExpand}"> 

</telerik:RadButton>

<telerik:RadButton Margin="0,0,10,0" Style="{DynamicResource RadImageButton}"

Command="{Binding Path=DataContext.ExpandCommand,RelativeSource={RelativeSource FindAncestor, AncestorType=telerikinput:RadExpander}}"

Visibility="{Binding Converter={StaticResource VisibilityConverter}, Path=IsCollapse}">

</telerik:RadButton>

<Label Content="Search Criteria" Margin="40,10,0,0" Style="{DynamicResource LabelBoldContentStyle}" HorizontalAlignment="Left"/>

</Grid>

</telerik:RadExpander.Header>


<Grid Margin="5">

<Button Grid.Row="7" Grid.Column="7" Height="28" Width="50" Margin="0,0,46,0"

Content="Search" HorizontalAlignment="Right" FontWeight="Bold"

Command="{Binding Path=DataContext.SearchComamnd, RelativeSource={RelativeSource FindAncestor, AncestorType=telerik:RadExpander}}"/>

</Grid>

Please let me know what I am missing in my code ?

Thnx,
Sivakumar

Pavel R. Pavlov
Telerik team
 answered on 30 Sep 2013
5 answers
177 views
Hi,

I am having a problem with the GridView: if the row is marked invalid because a property is invalid, the user is unable to edit any other cell.

Let's say I have a GridView that is letting me edit a class called Person that has 3 properties
  • Name: the person's name
  • Type: which allows the user to choose between Child or Adult
  • Age: that is validated according to the Person type (child is allowed to be between 1 - 19, adult is allowed to be between 19-120)

Now, let's say the user adds a new Person and enters a name, selects child as the person type by accident and enters an age of 30. Because the Person is actually not a child, the age property becomes invalid and the row is set to invalid.

At this point the user is not able to change the Type to Adult because they cannot leave the age field.

This is particularly a problem if the user attempts to save a person without entering an age or type because the row becomes invalid, the type is not selected and the field that the user is stuck in is the Age field. They cannot edit the type column and so the age is always going to be invalid.

How do I get around this?

Thank you,

-Rebecca

Dimitrina
Telerik team
 answered on 30 Sep 2013
3 answers
366 views
Please forgive my lack of understanding on how the Persistence Framework functions.

I have an application where I allow users to set what columns on a Grid View are visible or hidden.  When they close the application, I want to save their preferences.  When they open the application, I want to reload their preferences from the last time they used the program. 

This seems like a good job for Persistence Framework.  I began by looking at this WPF online help example:http://www.telerik.com/help/wpf/persistence-framework-getting-started.html

The code that saves my Grid View layout as a stream seems to be working, however, I'm having trouble reloading the layout once the application has been closed and re-opened.  When I re-open the application my Stream object is nothing, so the PersistenceManager.Load method throws an error.  I don't understand how to retrieve my saved Grid View Layout.

Can you describe how Persistence Framework functions, and help me understand how I retrieve and apply my saved Grid View layout?

Any assistance is greatly appreciated.  Thank you.
Dimitrina
Telerik team
 answered on 30 Sep 2013
1 answer
126 views
Hi,
I am adding/removing the columns of the grid dynamically.I have too many columns which i can add dynamically. When i add the columns and a horizontal scrollbar appears, i am not able to resize the columns of the grid. Currently I am using 2011.1.315.40 version of Telerik Gridview.I have taken the column width as "*"
Please help.
Really
Top achievements
Rank 1
 answered on 27 Sep 2013
1 answer
81 views
Hello,
I have GridView with some columns with
Width="*"
If I reduce width of GridView, unnecessary horizontal scrollbar appears. But when I click it, scrollbar disappears. There are no problems when all columns have
Width="Auto"
How can I fix it ?
Really
Top achievements
Rank 1
 answered on 27 Sep 2013
2 answers
108 views
Hey guys,

I have RadRibbonDropDownButtons with drop down content inside a RadRibbonView.QuickAccessToolBar.  I also have functionality to dynamically change telerik themes.

When the application opens, I am able to click the RadRibbonDropDownButtons and see the drop down content perfectly fine, but when I change themes the drop down content does not open. All other telerik components work fine.

Below is the code to dynamically change themes. Any ideas on what would cause the button's not to display their drop down content?
public Theme ThisApplicationTheme
{
   get { return StyleManager.ApplicationTheme; }
   set
   {
      StyleManager.ApplicationTheme = value;
      var binding = new Binding("ThisApplicationTheme") { Source = this, Mode = BindingMode.OneWay };
       foreach (Window window in Application.Current.Windows)
       {
            foreach (var element in GetWindow(window).AllChildren<FrameworkElement>().ToList())
            {
                 element.SetBinding(StyleManager.ThemeProperty, binding);
            }
       }
       Application.Current.MainWindow.SetBinding(StyleManager.ThemeProperty, binding);
   }
}
Niko
Top achievements
Rank 1
 answered on 27 Sep 2013
7 answers
535 views
Specifications:

Telerik libraries - RadControls for WPF Q2 3013 SP1
My Project: WPF desktop application in.Net 4.0 C#.

The problem:

I'm adding rows to the RagGridView through an ItemsSource binding to an observable collection.  Whenever an item is added to the collection, the RagGridView control reloads all previously added rows along with the new row.  It also re-instantiates user controls from the exsting rows.  For example, If I have 20 rows, and one gets added from the collection, the entire 20 rows are reloaded before the new one gets loaded. This makes the GUI get slower and slower as rows are added.

What's worse: When items are added that will be displayed out of the scrolling view, the RagGridView reloads all the old rows and then it eventually (after about 15 items are added that are not visible) goes into an infinite loop reloading all the rows that are not visible.  This locks up the GUI and fills up system memory since it re-instantiates user controls.  This infinite loop happens in my situation after about 45 to 50 rows total are in the grid control.

Here's the XAML definition of the control:

<telerik:RadGridView
    Name="VirtualDomainConfigurationsGrid"
    Grid.Row="0"
    ItemsSource="{Binding VirtualDomains}"
    Foreground="White"
    VerticalAlignment="Stretch"
    HorizontalAlignment="Stretch"
    AutoGenerateColumns="False"
    RowIndicatorVisibility="Collapsed"
    RowDetailsVisibilityMode="Collapsed"
    ShowGroupPanel="False"
    IsFilteringAllowed="False"
    CanUserFreezeColumns="False"
    CanUserReorderColumns="False"
    FrozenColumnsSplitterVisibility="Collapsed"
    CanUserSortColumns="True"
    SelectionUnit="FullRow"
    SelectionMode="Extended"
    BorderBrush="Transparent"
    Background="Transparent"
    SelectionChanged="VirtualDomainConfigurationsGrid_SelectionChanged"
    VirtualizingStackPanel.IsVirtualizing="True"
    VirtualizingStackPanel.VirtualizationMode="Standard"
    IsReadOnly="True"
    PreviewMouseRightButtonDown="VirtualDomainConfigurationsGrid_PreviewMouseRightButtonDown"
    PreviewMouseLeftButtonDown="VirtualDomainConfigurationsGrid_PreviewMouseLeftButtonDown"
    GridLinesVisibility="None"
    AlternationCount="2"
    AlternateRowBackground="{StaticResource DarkerBackgroundColor}"
    RowLoaded="VirtualDomainConfigurationsGrid_RowLoaded"
    >
    <telerik:RadGridView.InputBindings>
        <KeyBinding Command="{Binding Source={x:Static t:GenesisCommands.DeleteVantageVirtualDomain}}" Key="Delete" Gesture="Delete" />
    </telerik:RadGridView.InputBindings>
    <telerik:RadGridView.Resources>
        <Style TargetType="telerik:GridViewRow">
            <Setter Property="IsSelected" Value="{Binding Path=IsSelected, Mode=TwoWay}"/>
        </Style>
 
        <converters:StringToStyleConverter x:Key="stringToStyleConverter" />
    </telerik:RadGridView.Resources>
 
    <telerik:RadGridView.ContextMenu>
        <ContextMenu Name="VirtaulClusteContextMenu">
            <MenuItem
                Name="NewVirtualDomainContextMenuItem"
                Header="New Virtual Domain"
                Command="{Binding Source={x:Static t:GenesisCommands.CreateNewVantageVirtualDomain}}"
                IsEnabled="{Binding Source={x:Static dm:CloudServiceProviderAccountsDataModel.Instance}, Path=HasDefaultAccount}"
                />
            <MenuItem
                Name="DeleteVirtualDomainContextMenuItem"
                Header="Delete Virtual Domain"
                Command="{Binding Source={x:Static t:GenesisCommands.DeleteVantageVirtualDomain}}"
               />
            <MenuItem
                Name="StartVirtualDomainContextMenuItem"
                Header="Start Virtual Domain"
                Command="{Binding Source={x:Static t:GenesisCommands.StartVantageVirtualDomain}}"
               />
            <MenuItem
                Name="PauseVirtualDomainContextMenuItem"
                Header="Pause Virtual Domain"
                Command="{Binding Source={x:Static t:GenesisCommands.PauseVantageVirtualDomain}}"
               />
            <MenuItem
                Name="StopVirtualDomainContextMenuItem"
                Header="Stop Virtual Domain"
                Command="{Binding Source={x:Static t:GenesisCommands.StopVantageVirtualDomain}}"
               />
        </ContextMenu>
    </telerik:RadGridView.ContextMenu>
     
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn
            Name="VirtualClusterNameGridViewDataColumn"
            Header="Name"
            Width="150"
            MinWidth="100"
            IsSortable="True"
            SortingState="None"
           >
            <telerik:GridViewDataColumn.CellTemplate>
                <DataTemplate>
                    <StackPanel
                        Orientation="Horizontal"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Center"
                        ToolTip="{Binding CurrentName}"                                     
                        >
                        <Button
                            Margin="1,0,2,0"
                            Visibility="{Binding ProgressVisibilityInverted}">
                            <Button.Style>
                                <MultiBinding Converter="{StaticResource stringToStyleConverter}">
                                    <MultiBinding.Bindings>
                                        <Binding RelativeSource="{RelativeSource Self}"/>
                                        <Binding Path="StatusColorStyle"/>
                                    </MultiBinding.Bindings>
                                </MultiBinding>
                            </Button.Style>
                        </Button>
                        <Viewbox
                            Width="13" Height="13"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Visibility="{Binding ProgressVisibility}">
                            <usercontrols:CircularProgressBar />
                        </Viewbox>
                        <Label Foreground="White" Content="{Binding CurrentName}" Margin="4,0,0,0"/>
                    </StackPanel>
                </DataTemplate>
            </telerik:GridViewDataColumn.CellTemplate>
        </telerik:GridViewDataColumn>
        <telerik:GridViewDataColumn
            Name="VirtualClusterStateGridViewDataColumn"
            Header="State"
            Width="150"
            MinWidth="100"
            IsSortable="True"
            SortingState="None"
            >
            <telerik:GridViewDataColumn.CellTemplate>
                <DataTemplate>
                    <Label
                        Content="{Binding DataModel.State}"
                        ToolTip="{Binding DataModel.State}">
                    </Label>
                </DataTemplate>
            </telerik:GridViewDataColumn.CellTemplate>
        </telerik:GridViewDataColumn>
        <telerik:GridViewDataColumn
            Name="VirtualClusterMessageGridViewDataColumn"
            Header="Details"
            Width="330"
            MinWidth="200"
            IsSortable="True"
            SortingState="None"
            >
            <telerik:GridViewDataColumn.CellTemplate>
                <DataTemplate>
                    <StackPanel
                        Orientation="Horizontal"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Center"
                        ToolTip="{Binding DataModel.StatusMessage}"
                        >
                        <Label
                            Foreground="White"
                            Content="{Binding CurrentCommandName}"
                            Margin="0,0,0,0"
                            Visibility="{Binding ProgressVisibility}"/>
                        <Label
                            Foreground="White"
                            Content=" ("
                            Margin="2,0,0,0"
                            Visibility="{Binding ProgressVisibility}"/>                                   
                        <Label
                            Foreground="White"
                            Content="{Binding DataModel.TransitionProgressPercentage, Converter={StaticResource percentageConverter}}"
                            Margin="2,0,0,0"
                            Visibility="{Binding ProgressVisibility}"
                            />
                        <Label
                            Foreground="White"
                            Content="):"
                            Margin="2,0,5,0"
                            Visibility="{Binding ProgressVisibility}"/>
                        <Label
                            Foreground="White"
                            Content="{Binding DataModel.StatusMessage}"
                            />
                    </StackPanel>
                </DataTemplate>
            </telerik:GridViewDataColumn.CellTemplate>
        </telerik:GridViewDataColumn>
         
    </telerik:RadGridView.Columns>           
</telerik:RadGridView>

Here is the stack trace from my RowLoaded callback method while the RadGridControl is caught in the infinite loop:

>   VantageVirtualDomainManagement.exe!Telestream.Genesis.Client.Gui.MainWindow.VirtualDomainConfigurationsGrid_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e) Line 270   C#
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewDataControl.OnRowLoaded(Telerik.Windows.Controls.GridView.RowLoadedEventArgs e) Line 478    C#
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewDataControl.RaiseRowLoaded(Telerik.Windows.Controls.GridView.GridViewRowItem row) Line 7971 C#
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewRowItem.MeasureOverride(System.Windows.Size availableSize) Line 239 C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) + 0x313 bytes 
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) + 0x521 bytes 
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.NestedLayoutStrategy.MeasureChild(System.Windows.UIElement child, System.Windows.Size layoutSlotSize, int i) Line 1582    C#
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.NestedLayoutStrategy.MeasureOverride(System.Windows.Size constraint) Line 213 + 0x44 bytes    C#
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(System.Windows.Size availableSize) Line 342 + 0x47 bytes  C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) + 0x313 bytes 
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) + 0x521 bytes 
    PresentationFramework.dll!MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement element, System.Windows.Size constraint) + 0x6a bytes  
    PresentationFramework.dll!System.Windows.Controls.ScrollContentPresenter.MeasureOverride(System.Windows.Size constraint) + 0x19e bytes 
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) + 0x313 bytes 
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) + 0x521 bytes 
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCell(int cell, bool forceInfinityV) + 0x1a8 bytes
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCellsGroup(int cellsHead, System.Windows.Size referenceSize, bool ignoreDesiredSizeU, bool forceInfinityV, out bool hasDesiredSizeUChanged) + 0x169 bytes
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCellsGroup(int cellsHead, System.Windows.Size referenceSize, bool ignoreDesiredSizeU, bool forceInfinityV) + 0x3a bytes  
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size constraint) + 0x440 bytes   
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) + 0x313 bytes 
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) + 0x521 bytes 
    PresentationFramework.dll!System.Windows.Controls.ScrollViewer.MeasureOverride(System.Windows.Size constraint) + 0x37c bytes   
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewScrollViewer.MeasureOverride(System.Windows.Size availableSize) Line 199 + 0x2d bytes   C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) + 0x313 bytes 
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) + 0x521 bytes 
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCell(int cell, bool forceInfinityV) + 0x1a8 bytes
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCellsGroup(int cellsHead, System.Windows.Size referenceSize, bool ignoreDesiredSizeU, bool forceInfinityV, out bool hasDesiredSizeUChanged) + 0x169 bytes
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCellsGroup(int cellsHead, System.Windows.Size referenceSize, bool ignoreDesiredSizeU, bool forceInfinityV) + 0x3a bytes  
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size constraint) + 0x440 bytes   
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) + 0x313 bytes 
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) + 0x521 bytes 
    PresentationFramework.dll!System.Windows.Controls.Border.MeasureOverride(System.Windows.Size constraint) + 0x2f3 bytes 
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) + 0x313 bytes 
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) + 0x521 bytes 
    PresentationFramework.dll!System.Windows.Controls.Control.MeasureOverride(System.Windows.Size constraint) + 0x6a bytes 
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewDataControl.MeasureOverride(System.Windows.Size availableSize) Line 6677 + 0x3c bytes   C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) + 0x313 bytes 
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) + 0x521 bytes 
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCell(int cell, bool forceInfinityV) + 0x1a8 bytes
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCellsGroup(int cellsHead, System.Windows.Size referenceSize, bool ignoreDesiredSizeU, bool forceInfinityV, out bool hasDesiredSizeUChanged) + 0x169 bytes
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCellsGroup(int cellsHead, System.Windows.Size referenceSize, bool ignoreDesiredSizeU, bool forceInfinityV) + 0x3a bytes  
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size constraint) + 0x440 bytes   
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) + 0x313 bytes 
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) + 0x521 bytes 
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCell(int cell, bool forceInfinityV) + 0x1a8 bytes
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCellsGroup(int cellsHead, System.Windows.Size referenceSize, bool ignoreDesiredSizeU, bool forceInfinityV, out bool hasDesiredSizeUChanged) + 0x169 bytes
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCellsGroup(int cellsHead, System.Windows.Size referenceSize, bool ignoreDesiredSizeU, bool forceInfinityV) + 0x3a bytes  
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size constraint) + 0x6a9 bytes   
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) + 0x313 bytes 
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) + 0x521 bytes 
    PresentationFramework.dll!MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement element, System.Windows.Size constraint) + 0x6a bytes  
    PresentationFramework.dll!System.Windows.Controls.ContentPresenter.MeasureOverride(System.Windows.Size constraint) + 0x26 bytes
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) + 0x313 bytes 
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) + 0x521 bytes 
    PresentationFramework.dll!System.Windows.Documents.AdornerDecorator.MeasureOverride(System.Windows.Size constraint) + 0x98 bytes   
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) + 0x313 bytes 
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) + 0x521 bytes 
    PresentationFramework.dll!System.Windows.Controls.Border.MeasureOverride(System.Windows.Size constraint) + 0x2f3 bytes 
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) + 0x313 bytes 
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) + 0x521 bytes 
    PresentationFramework.dll!System.Windows.Window.MeasureOverrideHelper(System.Windows.Size constraint) + 0x1c0 bytes
    PresentationFramework.dll!System.Windows.Window.MeasureOverride(System.Windows.Size availableSize) + 0x171 bytes   
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) + 0x760 bytes 
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) + 0x521 bytes 
    PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayout() + 0x569 bytes  
    PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayoutCallback(object arg) + 0x22 bytes 
    PresentationCore.dll!System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() + 0x96 bytes  
    PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandlerCore(object resizedCompositionTarget) + 0xdf bytes  
    PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandler(object resizedCompositionTarget) + 0x2f bytes  
    WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) + 0x5e bytes
    WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source, System.Delegate method, object args, int numArgs, System.Delegate catchHandler) + 0x47 bytes   
    WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl() + 0x281 bytes
    mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) + 0x285 bytes
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) + 0x9 bytes  
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x57 bytes   
    WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke() + 0x71 bytes 
    WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue() + 0x2a1 bytes   
    WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0xb3 bytes
    WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0x14a bytes  
    WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) + 0x80 bytes   
    WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) + 0x5e bytes
    WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source, System.Delegate method, object args, int numArgs, System.Delegate catchHandler) + 0x47 bytes   
    WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) + 0x2bc bytes
    WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) + 0x140 bytes   
    [Native to Managed Transition] 
    [Managed to Native Transition] 
    WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame) + 0x112 bytes
    PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window) + 0x17a bytes   
    PresentationFramework.dll!System.Windows.Application.Run() + 0x67 bytes
    VantageVirtualDomainManagement.exe!Telestream.Genesis.Client.Gui.App.Main() + 0x77 bytes    C#
    [Native to Managed Transition] 
    [Managed to Native Transition] 
    Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() + 0x5a bytes 
    mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) + 0x285 bytes
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) + 0x9 bytes  
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x57 bytes   
    mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() + 0x51 bytes  
    [Native to Managed Transition] 


And here's the stack trace when the control is instantiating my CircularProgressBar user control in the infinite loop:


>   VantageVirtualDomainManagement.exe!Telestream.Genesis.Client.Gui.UserControls.CircularProgressBar.CircularProgressBar() Line 36 C#
    mscorlib.dll!System.Activator.CreateInstance(System.Type type, bool nonPublic) + 0x7f bytes
    mscorlib.dll!System.RuntimeType.CreateInstanceImpl(System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, object[] args, System.Globalization.CultureInfo culture, object[] activationAttributes, ref System.Threading.StackCrawlMark stackMark) + 0x5ff bytes   
    mscorlib.dll!System.Activator.CreateInstance(System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, object[] args, System.Globalization.CultureInfo culture, object[] activationAttributes) + 0xc8 bytes   
    mscorlib.dll!System.Activator.CreateInstance(System.Type type, object[] args) + 0x26 bytes 
    System.Xaml.dll!System.Xaml.Schema.SafeReflectionInvoker.CreateInstanceCritical(System.Type type, object[] arguments) + 0x1d bytes 
    System.Xaml.dll!System.Xaml.Schema.XamlTypeInvoker.CreateInstance(object[] arguments) + 0x97 bytes 
    System.Xaml.dll!MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateInstance(System.Xaml.XamlType xamlType, object[] args) + 0x85 bytes
    System.Xaml.dll!MS.Internal.Xaml.Runtime.PartialTrustTolerantRuntime.CreateInstance(System.Xaml.XamlType xamlType, object[] args) + 0x87 bytes 
    System.Xaml.dll!System.Xaml.XamlObjectWriter.Logic_CreateAndAssignToParentStart(MS.Internal.Xaml.Context.ObjectWriterContext ctx) + 0xbc bytes 
    System.Xaml.dll!System.Xaml.XamlObjectWriter.WriteEndObject() + 0x44d bytes
    PresentationFramework.dll!System.Windows.FrameworkTemplate.LoadTemplateXaml(System.Xaml.XamlReader templateReader, System.Xaml.XamlObjectWriter currentWriter) + 0x56 bytes
    PresentationFramework.dll!System.Windows.FrameworkTemplate.LoadTemplateXaml(System.Xaml.XamlObjectWriter objectWriter) + 0x67 bytes
    PresentationFramework.dll!System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(System.Windows.DependencyObject container, System.Windows.Markup.IComponentConnector componentConnector, System.Windows.Markup.IStyleConnector styleConnector, System.Collections.Generic.List<System.Windows.DependencyObject> affectedChildren, System.Windows.UncommonField<System.Collections.Hashtable> templatedNonFeChildrenField) + 0x363 bytes
    PresentationFramework.dll!System.Windows.FrameworkTemplate.LoadContent(System.Windows.DependencyObject container, System.Collections.Generic.List<System.Windows.DependencyObject> affectedChildren) + 0xaf bytes  
    PresentationFramework.dll!System.Windows.FrameworkTemplate.LoadContent() + 0x52 bytes  
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridViewColumn.GenerateElementWithHashCode(System.Windows.DataTemplate template) Line 362 + 0x12 bytes   C#
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridViewColumn.GenerateElementFromCellTemplate(Telerik.Windows.Controls.GridView.GridViewCell cell, System.Windows.DataTemplate template, out System.Windows.FrameworkElement element) Line 335 + 0xd bytes  C#
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridViewColumn.CreateCellElement(Telerik.Windows.Controls.GridView.GridViewCell cell, object dataItem) Line 321 + 0x19 bytes C#
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridViewBoundColumnBase.CreateCellElement(Telerik.Windows.Controls.GridView.GridViewCell cell, object dataItem) Line 117 + 0x1d bytes    C#
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewCell.CreateCellElement(Telerik.Windows.Controls.GridViewColumn column, object dataItem) Line 563 + 0x2b bytes   C#
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewCell.BuildVisualTree() Line 557 C#
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewCell.SetCellElement() Line 520  C#
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewRow.PrepareCell(Telerik.Windows.Controls.GridView.GridViewCellBase cellBase, Telerik.Windows.Controls.GridViewColumn column) Line 921   C#
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewCellsPanel.PrepareCell(Telerik.Windows.Controls.GridView.GridViewCellBase cell, Telerik.Windows.Controls.GridViewColumn column) Line 404    C#
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewCellsPanel.GetVirtualizedCell(Telerik.Windows.Controls.GridViewColumn column, bool createIfNull) Line 365   C#
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewCellsPanel.RealizeAndMeasureCells(int startIndex, int predictedLastIndex, System.Func<int,int> calculateNextIndex) Line 300 + 0x15 bytes    C#
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewCellsPanel.UpdateVirtualizedCells() Line 235    C#
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewCellsPanel.MeasureOverride(System.Windows.Size availableSize) Line 289 + 0xd bytes  C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) + 0x313 bytes 
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) + 0x521 bytes 
    PresentationFramework.dll!MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement element, System.Windows.Size constraint) + 0x6a bytes  
    PresentationFramework.dll!System.Windows.Controls.ItemsPresenter.MeasureOverride(System.Windows.Size constraint) + 0x26 bytes  
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) + 0x313 bytes 
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) + 0x521 bytes 
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size constraint) + 0x11e bytes   
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) + 0x313 bytes 
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) + 0x521 bytes 
    PresentationFramework.dll!System.Windows.Controls.Control.MeasureOverride(System.Windows.Size constraint) + 0x6a bytes 
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) + 0x313 bytes 
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) + 0x521 bytes 
    PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayout() + 0x569 bytes  
    PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayoutCallback(object arg) + 0x22 bytes 
    PresentationCore.dll!System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() + 0x96 bytes  
    PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandlerCore(object resizedCompositionTarget) + 0xdf bytes  
    PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandler(object resizedCompositionTarget) + 0x2f bytes  
    WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) + 0x5e bytes
    WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source, System.Delegate method, object args, int numArgs, System.Delegate catchHandler) + 0x47 bytes   
    WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl() + 0x281 bytes
    mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) + 0x285 bytes
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) + 0x9 bytes  
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x57 bytes   
    WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke() + 0x71 bytes 
    WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue() + 0x2a1 bytes   
    WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0xb3 bytes
    WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0x14a bytes  
    WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) + 0x80 bytes   
    WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) + 0x5e bytes
    WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source, System.Delegate method, object args, int numArgs, System.Delegate catchHandler) + 0x47 bytes   
    WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) + 0x2bc bytes
    WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) + 0x140 bytes   
    [Native to Managed Transition] 
    [Managed to Native Transition] 
    WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame) + 0x112 bytes
    PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window) + 0x17a bytes   
    PresentationFramework.dll!System.Windows.Application.Run() + 0x67 bytes
    VantageVirtualDomainManagement.exe!Telestream.Genesis.Client.Gui.App.Main() + 0x77 bytes    C#
    [Native to Managed Transition] 
    [Managed to Native Transition] 
    Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() + 0x5a bytes 
    mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) + 0x285 bytes
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) + 0x9 bytes  
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x57 bytes   
    mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() + 0x51 bytes  
    [Native to Managed Transition] 

I have tried turning data virturalization on and off with no change the results.  I have used the RadGridConrol with much success in the past, but I'm stumped here.  I hope I'm just missing something stupid.

Any suggestions?  Thanks.
Don
Top achievements
Rank 1
 answered on 27 Sep 2013
1 answer
86 views
I have a hyperlink in a cell of a GridView, I'm trying to use Automated UI Test to record the action of clicking on the hyperlink, the automation works well with the DataGrid that comes with Visual Studio but when I tried using Telerik's GridView, it fails. The error message I get, is along the lines, that it cannot detect the hyperlink. Could anyone please guide me on how to resolve this problem?
Ivan Ivanov
Telerik team
 answered on 27 Sep 2013
3 answers
271 views
Hello, a few questions about this feature:

1) Is it possible to show a tooltip on annotations?
2) Is it possible to have a click event (mousedown / mouseup should be fine too) on annotations to do something in response of a click?
3) Is it possible to update the way an annotation looks based on the mouse being over the annotation? I tried with style triggers but it didn't work.

Thanks!
Petar Kirov
Telerik team
 answered on 27 Sep 2013
1 answer
103 views
Hi
I have a draggable treeview and I would like to write on dragvisual content something like "Drop inside <Node Information>".
How can I get the Node information?

I tried something like this but "options" is always null

private Telerik.Windows.Controls.Label dragVisualLabel;
private void OnDragInitialize(object sender, DragInitializeEventArgs args)
{
    this.dragVisualLabel = new Telerik.Windows.Controls.Label() { ContentTemplate = RootGrid.Resources["ItemTemplate"] as DataTemplate, Content = "" };
    args.DragVisual = this.dragVisualLabel;
}
private void OnGiveFeedback(object sender, Telerik.Windows.DragDrop.GiveFeedbackEventArgs args)
{
    if (args.Effects == DragDropEffects.Move)
    {
        args.UseDefaultCursors = false;
        args.SetCursor(Cursors.Hand);
 
        var options = DragDropPayloadManager.GetDataFromObject(args.OriginalSource, TreeViewDragDropOptions.Key) as TreeViewDragDropOptions;
        if (options != null)
        {
            var dragVisual = options.DragVisual as TreeViewDragVisual;
 
            if (dragVisual != null)
            {
                var classModel = (options.DropTargetItem).DataContext as ClassObjectModel;
 
                if (classModel != null)
                {
                    this.dragVisualLabel.Content = string.Format("Drop inside {0} - {1}", classModel.Class.Code, classModel.Class.Description);
                }
            }
        }
 
 
        //  this.dragVisualLabel.Background = new SolidColorBrush(Colors.Yellow);              
 
    }
    else if (args.Effects == DragDropEffects.None)
    {
        args.UseDefaultCursors = false;
        args.SetCursor(Cursors.None);
        // this.dragVisualLabel.Background = new SolidColorBrush(Colors.Red);
    }
    else
    {
        args.UseDefaultCursors = true;
        //  this.dragVisualLabel.Background = new SolidColorBrush(Colors.Green);
    }
 
    args.Handled = true;
}


Thanks
Nick
Telerik team
 answered on 27 Sep 2013
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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?