| public Window1() |
| { |
| InitializeComponent(); |
| RadTileView1.ItemsSource = new ObservableCollection<Test> { |
| new Test() { Description = "11" }, |
| new Test() { Description = "22" } , |
| new Test() { Description = "33" } , |
| new Test() { Description = "44" } , |
| new Test() { Description = "55" } , |
| new Test() { Description = "66" } |
| }; |
| } |
| private void button1_Click(object sender, RoutedEventArgs e) |
| { |
| ObservableCollection<Test> col = (ObservableCollection<Test>)RadTileView1.ItemsSource; |
| col.Clear(); |
| col.Add(new Test() { Description = "aa" }); |
| col.Add(new Test() { Description = "bb" }); |
| col.Add(new Test() { Description = "cc" }); |
| col.Add(new Test() { Description = "dd" }); |
| } |

| <Window x:Class="TelerikTestProject.Window1" |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| Title="Window1" |
| xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared" |
| xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" |
| > |
| <Grid> |
| <telerik:RadGridView AutoGenerateColumns="False" ItemsSource="{Binding PatientDiagnoses}"> |
| <telerik:RadGridView.Columns> |
| <telerik:GridViewDataColumn Width="*" Header="Code" DataMemberBinding="{Binding Path=Code}" /> |
| </telerik:RadGridView.Columns> |
| </telerik:RadGridView> |
| </Grid> |
| </Window> |



Hello Telerik Team,
I managed to make RadGridView show multiple related tables (LINQ to SQL) by approach used in FirstLook sample (create GridViewTableDefinition and TableRelation). If I add two table definitions it works OK (besides showing empty table if no related record exists).
What I want to do is to change the look in (Image 4) by (Image 3)
5. The following code (Is the My own XAML code of My_TabControlStylingPic - as attached) - It was designed using Blend. Here is the code:
| <Window |
| 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" |
| x:Class="RadTabControlStyling.MainWindow" |
| x:Name="Window" |
| Title="MainWindow" |
| Width="703" Height="533"> |
| <Grid x:Name="LayoutRoot"> |
| <Rectangle Stroke="Black" Margin="8,8,8,0" Fill="#FF525252" VerticalAlignment="Top" Height="387"/> |
| <Border Margin="8,8,8,0" BorderBrush="Black" BorderThickness="3" VerticalAlignment="Top" Height="387"> |
| <Rectangle Stroke="Black" Margin="20,84,20,0" StrokeThickness="2" VerticalAlignment="Top" Height="276"> |
| <Rectangle.Fill> |
| <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> |
| <GradientStop Color="Black" Offset="0"/> |
| <GradientStop Color="#FF3C3C3C" Offset="1"/> |
| </LinearGradientBrush> |
| </Rectangle.Fill> |
| </Rectangle> |
| </Border> |
| <telerik:RadTabControl Margin="50,53,52,0" VerticalAlignment="Top" Height="39"> |
| <telerik:RadTabControl.Background> |
| <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> |
| <GradientStop Color="Black" Offset="0"/> |
| <GradientStop Color="#FF969494" Offset="1"/> |
| <GradientStop Color="#FF191818" Offset="0.261"/> |
| <GradientStop Color="#FF585353" Offset="0.504"/> |
| <GradientStop Color="#FF676666" Offset="0.75"/> |
| </LinearGradientBrush> |
| </telerik:RadTabControl.Background> |
| <telerik:RadTabItem Width="110" Height="30" BorderThickness="2" Header="RadTabItem" telerik:StyleManager.Theme="Vista"/> |
| <telerik:RadTabItem Width="110" BorderThickness="2" Header="RadTabItem"/> |
| <telerik:RadTabItem Width="110" BorderThickness="2" Header="RadTabItem"/> |
| </telerik:RadTabControl> |
| <StackPanel VerticalAlignment="Top" Height="30" Margin="34,96,34,0"> |
| <StackPanel.Background> |
| <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> |
| <GradientStop Color="Black" Offset="0"/> |
| <GradientStop Color="#FF373737" Offset="1"/> |
| </LinearGradientBrush> |
| </StackPanel.Background> |
| </StackPanel> |
| </Grid> |
| </Window> |
| <Window x:Class="RadWpfDataGridsample.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" > |
| <Grid Loaded="Grid_Loaded" Background="Black" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> |
| <Grid.Resources> |
| <Style TargetType="Telerik:ChildDataControlsPresenter"> |
| <Setter Property="Template"> |
| <Setter.Value> |
| <ControlTemplate TargetType="Telerik:ChildDataControlsPresenter"> |
| <TabControl> |
| <!--<TabControl.Background> |
| <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> |
| <GradientStop Color="Black" Offset="0"/> |
| <GradientStop Color="#FF969494" Offset="1"/> |
| <GradientStop Color="#FF191818" Offset="0.261"/> |
| <GradientStop Color="#FF585353" Offset="0.504"/> |
| <GradientStop Color="#FF676666" Offset="0.75"/> |
| </LinearGradientBrush> |
| </TabControl.Background>--> |
| <!--<Rectangle Stroke="Black" Margin="8,8,8,0" Fill="#FF525252" VerticalAlignment="Top" Height="387"/> |
| <Border Margin="8,8,8,0" BorderBrush="Black" BorderThickness="3" VerticalAlignment="Top" Height="387"> |
| <Rectangle Stroke="Black" Margin="20,84,20,0" StrokeThickness="2" VerticalAlignment="Top" Height="276"> |
| <Rectangle.Fill> |
| <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> |
| <GradientStop Color="Black" Offset="0"/> |
| <GradientStop Color="#FF3C3C3C" Offset="1"/> |
| </LinearGradientBrush> |
| </Rectangle.Fill> |
| </Rectangle> |
| </Border>--> |
| <TabItem Width="110" |
| Height="30" |
| BorderThickness="2" |
| Header="Orders" > |
| <Telerik:RadGridView ItemsSource="{Binding MasterRecord.Data.Orders}" /> |
| </TabItem> |
| </TabControl> |
| </ControlTemplate> |
| </Setter.Value> |
| </Setter> |
| </Style> |
| </Grid.Resources> |
| <Telerik:RadGridView Name="radGridView1" |
| ScrollMode="Deferred" |
| ClipToBounds="True" |
| FlowDirection="LeftToRight" |
| MultipleSelect="True" |
| ShowGroupFooters="True" |
| ShowColumnFooters="True" |
| Telerik:StyleManager.Theme="Vista" |
| Margin="0,0,0,12" /> |
| </Grid> |
| </Window> |
<
telerikNavigation:RadPanelBar ItemsSource="{Binding Path=Sections}"
ItemTemplate="{StaticResource SectionsTemplate}"/>
And I have the two following templates:
<
DataTemplate x:Key="CommandsTemplate">
<StackPanel Orientation="Vertical" Margin="5">
<TextBlock Margin="2,6">
<Hyperlink Command="{Binding Path=Command}">
<TextBlock Text="{Binding Path=DisplayName}" />
</Hyperlink>
</TextBlock>
</StackPanel>
</DataTemplate>
<DataTemplate x:Key="SectionsTemplate">
<telerikNavigation:RadPanelBarItem ItemsSource="{Binding Path=Commands}" ItemTemplate="{StaticResource CommandsTemplate}">
<telerikNavigation:RadPanelBarItem.Header>
<TextBlock Text="{Binding Path=SectionName}" />
</telerikNavigation:RadPanelBarItem.Header>
</telerikNavigation:RadPanelBarItem>
</DataTemplate>
The result is that there is like an other control in the sections bars, and I have to click on it (the arrow is not working) to see the list of commands, but instead of the commands being simple links, they appear as a RadPanelBar, with an arrow on the right which is doing nothing.
What am I doing wrong?
Best regards,
Daniel Varrin
| <Grid.Resources> |
| <Style TargetType="telerik1:ChildDataControlsPresenter"> |
| <Setter Property="Template"> |
| <Setter.Value> |
| <ControlTemplate TargetType="telerik1:ChildDataControlsPresenter"> |
| <telerik:RadGridView x:Name="radGridView1" RowDetailsVisibilityMode="VisibleWhenSelected" Height="400" > |
| <telerik:RadGridView.RowDetailsTemplate> |
| <DataTemplate> |
| <Grid Margin="31,22,24,419" Name="grid1"> |
| <Grid.RowDefinitions> |
| <RowDefinition Height="32"/> |
| <RowDefinition Height="56*"/> |
| </Grid.RowDefinitions> |
| <Grid.ColumnDefinitions> |
| <ColumnDefinition Width="95" /> |
| <ColumnDefinition Width="201" /> |
| <ColumnDefinition Width="75" /> |
| <ColumnDefinition Width="352" /> |
| </Grid.ColumnDefinitions> |
| <Label Name="lblStartDate" Foreground="White" Content="Start Date :" Grid.Row="0" Grid.ColumnSpan="2" HorizontalAlignment="Left" Width="79" /> |
| <Label Name="lblStatus" Foreground="White" Content="Status :" Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="2" HorizontalAlignment="Left" Width="60" /> |
| <TextBox Name="txtStatus" Grid.Column="3" Grid.Row="0" Height="25" BorderThickness="2" Text="{Binding status }" /> |
| <telerik1:RadDatePicker Height="24" Name="txtStartDate" Width="138" SelectionChanged="txtStartDate_SelectionChanged" Grid.Column="1" SelectedDate="{Binding createdDate}" Grid.Row="0" /> |
| <Label Name="lblDueDate" Content="Due Date :" Foreground="White" Grid.Row="1" Margin="6,6,19,21" /> |
| <telerik1:RadDatePicker Height="24" Name="txtDueDate" DisplayMode="MonthView" Width="138" Grid.Column="1" Grid.Row="1" SelectedDate="{Binding dueDate}" Margin="10,5,10,20" /> |
| <Label Name="lblPriority" Content="Priority :" Foreground="White" Grid.Row="1" Grid.Column="2" Margin="1,2,14,24" /> |
| <TextBox Name="txtPriority" Grid.Column="3" Height="25" Grid.Row="1" Width="100" Text="{Binding priority}" HorizontalAlignment= "Left" BorderThickness="2" Margin="5,4,0,22" /> |
| <Label Name="lblComplete" Content="% Complete :" Foreground="White" Grid.Row="1" Grid.Column="3" Margin="125,4,0,20" HorizontalAlignment="Left" Width="78" /> |
| <TextBox Name="txtCompletedPercentage" Width="70" Height="25" Grid.Column="3" Grid.Row="1" Margin="200,4,0,20" Text="{Binding percentageCompleted}" HorizontalAlignment="Left"/> |
| </Grid> |
| </DataTemplate> |
| </telerik:RadGridView.RowDetailsTemplate> |
| </telerik:RadGridView> |
| </ControlTemplate> |
| </Setter.Value> |
| </Setter> |
| </Style> |
| </Grid.Resources> |
| <telerik:RadGridView x:Name="radGridView1" RowDetailsVisibilityMode="VisibleWhenSelected" Height="435" Margin="3,76,12,12" Width="990" /> |