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

I was wondering if you have some sample code, that describes creating DataGrid Programmatically (not through XAML) - Multiple columns, and each with their own CellDataTemplate and CellEditTemplate? I searched through Documentation but couldn't find it.

Thanks,
Pavel Pavlov
Telerik team
 answered on 29 Apr 2010
1 answer
120 views

I have two Docked windows on the Left and Right side of my GUI (Similar to Visual Studio: Solution Explorer on the Left, Properties on the Right). I want to do the following

1. If I auto-hide the window on the left, it should auto-hide the window on the Right as well (and vice-versa)
2. If I dock the window on the left, it should dock the window on the right as well (and vice-versa)
3. If the windows are in Auto-Hide mode, and if the user clicks on the auto-hide window on left, the auto-hide window on the right should also expand, and when lost focus. Both should hide at the same time.

Can you tell how can I do this? If possible can you point to some sample code that accomplishes this?

Also is there a event that is fired, when a pane is docked or pinned?

Miroslav Nedyalkov
Telerik team
 answered on 29 Apr 2010
2 answers
59 views
Hi everyone

Quick question:

Is there a way to group the same Member several times? Take a look at the following code:

                         
                        <telerik:GridViewDataColumn Header="Jahr" DataMemberBinding="{Binding datum}" DataFormatString="{}{0:yyyy}" /> 
                        <telerik:GridViewDataColumn Header="Monat" DataMemberBinding="{Binding datum}" DataFormatString="{}{0:MMM}" /> 
                        <telerik:GridViewDataColumn Header="Tag" DataMemberBinding="{Binding datum}" DataFormatString="{}{0:dd}" /> 
 
         

I would like to group by Year (Jahr) and Month (Monat). Because the Member is always "datum" (date), I only can group one at a time.
Is there  a way to achieve this within or outside the RadGridView?


Martin Egger
Top achievements
Rank 2
 answered on 29 Apr 2010
1 answer
128 views
Hi guys,

I think you are missing ThicknessConverter declaration in "Customizing appearance of the radial gauge" help topic.
Like:
<telerik:ThicknessExpressionConverter x:Key="ThicknessConverter" />

Nikolay
Telerik team
 answered on 29 Apr 2010
1 answer
259 views
I am looking at needle customization documentation topic: "Customizing appearance of the radial gauge " and the following template:
<Style x:Key="TriangleNeedleTemplate" TargetType="{x:Type telerik:Needle}"
                <Setter Property="Template"
                    <Setter.Value> 
                        <ControlTemplate TargetType="{x:Type telerik:Needle}"
                            <Grid Width="{TemplateBinding ActualWidth}" Height="{TemplateBinding ActualHeight}"
                                <Grid.ColumnDefinitions> 
                                    <ColumnDefinition Width="{TemplateBinding ActualHeight}"/> 
                                    <ColumnDefinition Width="*" /> 
                                </Grid.ColumnDefinitions> 
 
                                <Grid.RowDefinitions> 
                                    <RowDefinition Height="{TemplateBinding ActualHeight}" /> 
                                </Grid.RowDefinitions> 
                                <Border Background="Red" /> 
                                <Polygon Grid.ColumnSpan="2" Points="0,0 1,0.5 0,1 0,0" Stretch="Fill"  
                                         Fill="White" /> 
                            </Grid> 
                        </ControlTemplate> 
                    </Setter.Value> 
                </Setter> 
            </Style> 

produces templatebinding (attached) picture. Note the red rectangle that should be ActualHeight x ActualHeight big, yet it is much wider (1/2 of the grid).
However, the "should be equivalent" binding
{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActualHeight
produces the correct result (see expandedbinding picture).
Correct style:
<Style x:Key="TriangleNeedleTemplate" TargetType="{x:Type telerik:Needle}"
                <Setter Property="Template"
                    <Setter.Value> 
                        <ControlTemplate TargetType="{x:Type telerik:Needle}"
                            <Grid Width="{TemplateBinding ActualWidth}" Height="{TemplateBinding ActualHeight}"
                                <Grid.ColumnDefinitions> 
                                    <ColumnDefinition Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActualHeight}"/> 
                                    <ColumnDefinition Width="*" /> 
                                </Grid.ColumnDefinitions> 
 
                                <Grid.RowDefinitions> 
                                    <RowDefinition Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActualHeight}" /> 
                                </Grid.RowDefinitions> 
                                <Border Background="Red" /> 
                                <Polygon Grid.ColumnSpan="2" Points="0,0 1,0.5 0,1 0,0" Stretch="Fill"  
                                         Fill="White" /> 
                            </Grid> 
                        </ControlTemplate> 
                    </Setter.Value> 
                </Setter> 
            </Style> 



Andrey
Telerik team
 answered on 29 Apr 2010
1 answer
88 views
Looks like the editor doesn't recover anymore after the first comment keyword (see attached pic)
Kaloyan
Telerik team
 answered on 29 Apr 2010
1 answer
113 views
Looking at the deoms (Compass) I see this needle template:
<Grid x:Name="PART_Grid" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                <Grid.ColumnDefinitions> 
                                    <ColumnDefinition Width="*" /> 
                                    <!-- Column 0 - tail --> 
                                    <ColumnDefinition Width="*" /> 
                                    <!-- Column 1 - pin point --> 
                                    <ColumnDefinition Width="*" /> 
                                    <!-- Column 2 - arrow --> 
                                </Grid.ColumnDefinitions> 
                                <Grid.RowDefinitions> 
                                    <RowDefinition Height="*" /> 
                                </Grid.RowDefinitions> 

I guess the old one that appears in the documentation (without TemplatePart) is obsolete and even not properly working?
Andrey
Telerik team
 answered on 29 Apr 2010
1 answer
103 views
I have a child grid as below, but it doesn't honor Widths set to the columns in Xaml.  Also, even though I've set the FrozenColumnCount, when I scroll left or right, the entire child table scrolls left or right and the columns that are supposed to be frozen scroll as well.

<telerik:RadGridView.HierarchyChildTemplate>
                        <DataTemplate>
                            <telerik:RadGridView x:Name="RadGridView1" CanUserFreezeColumns="True" CanUserInsertRows="False"
                                                 CanUserReorderColumns="False" CanUserResizeColumns="True" FrozenColumnCount="8" ShowColumnHeaders="True" IsFilteringAllowed="False"
                                                 AutoGenerateColumns="False" ItemsSource="{Binding SkuForecastArchiveData}"  ShowGroupPanel="False" IsReadOnly="True">
                                <telerik:RadGridView.Columns>
                                    <telerik:GridViewDataColumn Header="Sku" DataMemberBinding="{Binding Sku}" Width="48" />
...
Yordanka
Telerik team
 answered on 28 Apr 2010
2 answers
79 views
How i can set the grid as non editable?, is this possible?
dennis
Top achievements
Rank 1
 answered on 28 Apr 2010
1 answer
110 views
Hi guys,

Check out the following XAML
<Window x:Class="WpfApplication28.MainWindow" 
        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="MainWindow" Height="350" Width="525" Background="Gray"
    <Grid> 
        <Grid.Resources> 
            <ControlTemplate x:Key="Tubo"
                <telerik:RadialGauge Width="150" Height="150"
                    <telerik:RadialScale Name="radialScale" StartAngle="135" SweepAngle="270" Radius=".95" 
                            MajorTicks="5" MinorTicks="1" MiddleTicks="1" LabelRotationMode="None"
                        <telerik:RadialScale.Label> 
                            <telerik:LabelProperties Location="Inside" FontSize="20" Foreground="Red" /> 
                        </telerik:RadialScale.Label> 
                    </telerik:RadialScale> 
                </telerik:RadialGauge> 
            </ControlTemplate> 
            <Style TargetType="{x:Type Control}"
                <Setter Property="Template" Value="{StaticResource Tubo}"
                </Setter> 
            </Style> 
        </Grid.Resources> 
        <Grid.RowDefinitions> 
            <RowDefinition /> 
            <RowDefinition /> 
        </Grid.RowDefinitions> 
        <Control /> 
        <telerik:RadialGauge Grid.Row="1"
            <telerik:RadialScale Name="radialScale" StartAngle="135" SweepAngle="270" Radius=".95" 
                            MajorTicks="5" MinorTicks="1" MiddleTicks="1" LabelRotationMode="None"
                <telerik:RadialScale.Label> 
                    <telerik:LabelProperties Location="Inside" FontSize="20" Foreground="Red" /> 
                </telerik:RadialScale.Label> 
            </telerik:RadialScale> 
        </telerik:RadialGauge> 
    </Grid> 
</Window> 
 

It shows two gauges, first one defined through a controltemplate embedded in style while the other directly. The former doesn't apply Label properties at all nor MajorTicks (not shown) but it does apply Needle if one is specified.
Andrey
Telerik team
 answered on 28 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?