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).
I'd like to know if there exists a way, to show each of related tables in separate tab of RadTabControl.
- RadGridView (Attached Image which describes how is related tables are used via TabControl in your WPF Demo Application)
- Telerik_WPFControls_Demo_DataGrid (Attached Image which describes how is related tables are used via TabControl in your WPF Demo Application)
- My_TabControlStylingPic (The style that I want to use )
- CurrentRelatedTabelLook( The current look of the related table)
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> |
6. The following code is the current code that represents Classical Hirerchial Related Table.
<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> |
Now... what I want to do is just to modify the code in 6 by code in 5 in order to get the look in My_TabControlStylingPic attached image.
Hope that you can help me since I am stack, and cannot go on in my application. This is teh look that my customer needs.
Thank you
Wael 6. The following code is the current code that represents Classical Hirerchial Related Table.Hope that you can help me since I am stack, and cannot go on in my application. This is teh look that my customer needs.Thank you Wael