Telerik Forums
UI for WPF Forum
1 answer
126 views

We have an application that uses the Docking controls and we are using the LoadLayout and SaveLayout functionality to restore dock panel positions. Each of our dock panels is populated with a module using a Prism region.

The problem we're seeing is that after calling LoadLayout, the restored dock panel is empty. It's as though the view is not being injected into the region after restoring the layout. Is there some way I can do this programmatically after the layouts are restored?

Kevin
Top achievements
Rank 1
 answered on 03 Nov 2010
6 answers
261 views

Hi,
My Grid is loading its data by a user request. So when the Grid is loaded at the startup it is empty.
When the grid is loaded with data by a command that user selects I need to select the first row and set the focus to the first cell of that row. I am using RowLoaded event in this code to accomplish this:

private void SearchGrid_RowLoaded(object sender, RowLoadedEventArgs e)
{
    //Set the focus to first cell after the last row is loaded
    if (SearchGrid.ChildrenOfType<GridViewCell>().Count() > 0)
    {
        if (e.DataElement == SummaryList[SummaryList.Count() - 1])
        {
            SearchGrid.SelectedItem = SummaryList[0];
            SearchGrid.ChildrenOfType<GridViewCell>().First().Focus();
        }
    }
}

I am wondering if there is an event that tells me the Grid has finished its generating cells so I can set my focus at that time?

Thanks
Ramin
Top achievements
Rank 1
 answered on 03 Nov 2010
6 answers
128 views
Telerik has a DataSeriesCollection which I am using to add different line data series. Is there a way in which I could bind this series to the itemsmapping collection?
Because right now I am not using any binding and in my core behind I am using the DataSeries.AddRange method to add the data series collection.
Help would be much appreciated!
Thanks,
Farhan
Evgeni "Zammy" Petrov
Telerik team
 answered on 03 Nov 2010
1 answer
302 views
Hi,

I really like your transition control and want to extend it with futher transitions effect. Thus I am trying to adjust the WPF Pixel Shader Effect Library found at:

http://wpffx.codeplex.com/

The easiest way would be if you alrady had a binary version with support for Telerik (TransitionProvider). But I havn't managed to find such. Do you know of such?

First, let me say, that I have been able to follow the guide for custom transitions in your online manual, but there are quite a few transitions available so it would be convinient to just adjust the code of the project found at CodePlex (to support telerik transition model). But maybe it isn't posible. Let me try to explain what I have done, and which error I get when using the adjusted library. 

 

As a proof of concept I have tried to adjust the CircleRevealTransitionsEffect to support telerik doing as follows:

Changed the "CircleRevealTransitionEffect" to inherit from BaseTransitionEffect (I assume that this might be the problem)

public class CircleRevealTransitionEffect :  Telerik.Windows.Controls.TransitionEffects.BaseTransitionEffect

And the added a new class "CircleRevealTransitionProvider"

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Telerik.Windows.Controls.TransitionControl;
using System.Windows.Media.Effects;
  
namespace TransitionEffects.TelerikProviders
{
    public class CircleRevealTransitionProvider : TransitionProvider
    {
        protected override ShaderEffect CreateTransitionEffect()
        {
            CircleRevealTransitionEffect effect = new CircleRevealTransitionEffect();
            return effect;
        }
    }
}

 

 

 

 

 

 

Everything compiles nicely but using the transition gives an runtime error: "transitioncontrol/transitioneffects/effects/circlerevealtransitioneffect.ps". Do you have a clue to what can be the problem.

I know that my question will force you to install WPF Shader Effect library yourself, but if this is a problem I will try minimize the size of the library and attach my own version here. But I guess it is more simple for you to download the complete source from CodePlex. Remeber to install the "Shader Effect Build Task and Effects" to be able to compile it all. It's works smoothly.

http://wpf.codeplex.com/releases/view/14962#DownloadId=40167

Looking forward to hear from you.

 

 

 

 

Miroslav Nedyalkov
Telerik team
 answered on 03 Nov 2010
2 answers
86 views
Hi

I have implimented the export function to export to supported file types. Unfortunately only the first page of data (using RadDataPager) exports. Strangely, if you first group a column, then all the data is exported (though obviously not grouped).

Any ideas why?
Murray
Top achievements
Rank 2
 answered on 03 Nov 2010
2 answers
177 views

Hi,

I'm using RadGridView to display object's properties, like a PropertyGrid.

I need to change the template of the cell according to the type of the property.

I defined templates for text, color, and enum, also two template selectors, one for edit and one for normal mode.

For example, an enum should be edit  by choosing an item out of a combobox and to be displayed in a TextBlock.

The problem, is when I set the enum template for both the edit selector and normal selector, the combobox is not displayed in edit mode, like this template is ignored.

In resources: 

        <DataTemplate x:Key="TextPropertyValueEditTemplate">
            <TextBox Text="{Binding PropertyValue, Mode=TwoWay}" />
        </DataTemplate>
        
<
DataTemplate x:Key="ColorPropertyValueEditTemplate">
            <telerik:RadColorPicker SelectedColor="{Binding PropertyValue, Mode=TwoWay}" ColorButtonStyle="{StaticResource ColorButtonStyle}" />
        </DataTemplate>
        
<
DataTemplate x:Key="EnumPropertyValueEditTemplate">
            <ComboBox Text="{Binding PropertyValue, Mode=OneWay}"
                          SelectedValue="{Binding PropertyValue, Mode=TwoWay}" 
                          ItemsSource="{Binding EnumNames}"   />
        </DataTemplate>

        <DataTemplate x:Key="EnumPropertyValueNormalTemplate">
                        <TextBox Text="{Binding PropertyValue}" />
                </DataTemplate>


        <Controls:PropertyValueDataTemplateSelector x:Key="PropertyValueEditTemplateSelector"
                                                           TextTemplate="{StaticResource TextPropertyValueEditTemplate}" 
                                                           ColorTemplate="{StaticResource ColorPropertyValueEditTemplate}"
                                                           EnumTemplate="{StaticResource EnumPropertyValueEditTemplate}"
                                                          />
        <Controls:PropertyValueDataTemplateSelector x:Key="PropertyValueTemplateSelector"
                                                           ColorTemplate="{StaticResource ColorPropertyValueEditTemplate}"
                                                           EnumTemplate="{StaticResource TextPropertyValueEditTemplate}"
                                                           />


In the grid:

<telerik:RadGridView Name="dataGrid1"
                             AutoGenerateColumns="False" 
                             ShowGroupPanel="False"
                             ShowColumnHeaders="False"
                             >

            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn  Header="Name" Width="120" 
                                             DataMemberBinding="{Binding PropertyName}"/>
                <telerik:GridViewDataColumn  Header="Value" Width="100*"
                                             DataMemberBinding="{Binding PropertyValue}" 
                                             CellTemplateSelector="{StaticResource PropertyValueTemplateSelector}"
                                             CellEditTemplateSelector="{StaticResource PropertyValueEditTemplateSelector}" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>

Now, I know one way to make this sample work, is just to remove the EnumTemplate
from propertyValueTemplateSelector (Normal), It will work, but I have other types I want to
display differently in edit and normal mode.

Appreciate for any help.

Shmulik
Top achievements
Rank 1
 answered on 03 Nov 2010
1 answer
163 views
Hello,
I'm using the RadPanelBar in an application who use the MVVM pattern with the following binding on the ItemSource property:

<telerikNavigation:RadPanelBar Grid.Row="1" Margin="10" telerik:StyleManager.Theme="Windows7" x:Name="pbPanels"
            ItemsSource="{Binding NavigationsPanelItems}"
            SelectedItem="{Binding SelectedPanelItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="DisplayName">
        </telerikNavigation:RadPanelBar>
<telerikNavigation:RadPanelBar Grid.Row="1" Margin="10" telerik:StyleManager.Theme="Windows7" x:Name="pbPanels"
            ItemsSource="{Binding NavigationsPanelItems}"
            SelectedItem="{Binding SelectedPanelItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
            DisplayMemberPath="DisplayName">
</telerikNavigation:RadPanelBar>

with a hierarchicaldatatemplate:

<HierarchicalDataTemplate DataType="{x:Type vm:TPNavigationGeneralInfoViewModel}"
                    ItemTemplate="{StaticResource pbiGeneralInfoTemplate}" ItemsSource="{Binding PanelBarContent}">
                <TextBlock Text="{Binding DisplayName}" Height="20" Margin="5 2 5 2" FontWeight="Bold" FontSize="16"/
</HierarchicalDataTemplate>

where the ItemTemplate is a custom UserControl.

I need to bind the property IsEnabled of each one of the PanelBarItems inside the collection, but I'm not able to do that. Can you please give me some hints?

Thanks,
Flavio
Miro Miroslavov
Telerik team
 answered on 03 Nov 2010
4 answers
236 views
Hi,

We are looking to export data from the grid that a user has filtered. Is there anyway of getting the rows that are visible after the user has filtered them?


Craig
Craig
Top achievements
Rank 1
 answered on 03 Nov 2010
2 answers
291 views
Hi..
I have the following RadButton.. how can I add CTRL+N to fire it too?  thanks

 

 

<telerikPresentation:RadButton BorderBrush="Blue" BorderThickness="1" ClickMode="Press" FontSize="20" Margin="162,0,0,9" Name="btnNew" Click="btnNew_Click" Height="40" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="90">

 

 

 

<telerikPresentation:RadButton.Effect>

 

 

 

<DropShadowEffect ShadowDepth="5" />

 

 

 

</telerikPresentation:RadButton.Effect>

 

 

 

<StackPanel Height="28" HorizontalAlignment="Left" Orientation="Horizontal" VerticalAlignment="Top" Width="81" >

 

 

 

<Image Height="28" Source="/icons/truck_blue.png" Width="30" />

 

 

 

<TextBlock FontSize="14" Foreground="Navy" Margin="9,0,0,0" Text="New" OverridesDefaultStyle="True" Height="27" Width="37" />

 

 

 

</StackPanel>

 

 

 

</telerikPresentation:RadButton>

 

Jon
Top achievements
Rank 1
 answered on 02 Nov 2010
4 answers
123 views
Is it possible to pivot the gridview so that columns behave as rows, and vice-versa?  For example, when a row is added, it actually adds a column and the rows stay static.
David Brenchley
Top achievements
Rank 1
 answered on 02 Nov 2010
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?