This is a migrated thread and some comments may be shown as answers.

Related Tables in Tabs

2 Answers 26 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Wael Slaman
Top achievements
Rank 1
Wael Slaman asked on 14 Dec 2009, 12:04 AM
Hello,

I'd like to know if there exists a way, to show each of related tables while grouping in separate tab of RadTabControl.
I mean that I would like to do the same as in the WPF DataGridView Demo. If you have the Demo , just run it (DataGrid), and you will see that each related table is in TabControl.

Thank you
Wael

2 Answers, 1 is accepted

Sort by
0
Stefan Dobrev
Telerik team
answered on 16 Dec 2009, 01:29 PM
Hi Wael,

Can you point us to the demo you are talking about? Having the demo we can suggest you a solution how to implement this with RadGridView.


Sincerely yours,
Stefan Dobrev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Wael Slaman
Top achievements
Rank 1
answered on 16 Dec 2009, 02:01 PM
Thank you for asnwering.

Here is the demo
RadGridView Demo
http://www.telerik.com/products/wpf/gridview.aspx

I have succeeded to do almost the same look. I am posting the code here , and few attached images, which explain exactly wjat I want and what I need.

<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" 
    xmlns:nav="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" 
    xmlns:chart="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting">  
 
 
    <Window.Resources> 
        <LinearGradientBrush x:Key="TabItemButtonBrush" 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> 
    </Window.Resources> 
 
 
 
    <Grid Loaded="Grid_Loaded">  
        <Grid.Resources> 
            <Style TargetType="Telerik:ChildDataControlsPresenter">  
                <Setter Property="Template">  
                    <Setter.Value> 
                        <ControlTemplate TargetType="Telerik:ChildDataControlsPresenter">  
                            <!--<TabControl>--> 
                            <Grid x:Name="HirerchialTableLook" Height="400">  
                                <!--<Rectangle Stroke="Black" Margin="30,30,30,30" Fill="#FF525252" VerticalAlignment="Top" Height="387"/>--> 
                                <!--<Border Margin="30,30,30,30" BorderBrush="Black" BorderThickness="3" VerticalAlignment="Top" Height="387">--> 
                                <!--<Rectangle Stroke="Black" Margin="30,93,30,50" StrokeThickness="2" VerticalAlignment="Top" Height="350">  
                                <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>--> 
 
                                <StackPanel VerticalAlignment="Top" Height="30" Margin="71,87,71,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> 
                                  
                                <Telerik:RadTabControl Margin="70,51,70,0" VerticalAlignment="Top" Height="300">  
                                    <Telerik:RadTabControl.Background> 
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">  
                                            <GradientStop Color="Wheat" Offset="0"/>  
                                            <GradientStop Color="#FF191818" Offset="0.05"/>  
                                            <GradientStop Color="#FF191818" Offset="0.261"/>  
                                            <GradientStop Color="#FF585353" Offset="0.504"/>  
                                            <GradientStop Color="#FF676666" Offset="0.75"/>  
                                            <GradientStop Color="#FF969494" Offset="1"/>  
                                        </LinearGradientBrush> 
                                    </Telerik:RadTabControl.Background> 
                                      
                                    <Telerik:RadTabItem   
                                                Height="30" 
                                                BorderThickness="2"   
                                                Header="Orders Details"   
                                                VerticalAlignment="Center"   
                                                SnapsToDevicePixels="True"   
                                                HorizontalContentAlignment="Center" 
                                                Telerik:StyleManager.Theme="Vista">  
 
                                        <Telerik:RadGridView   
                                            ShowGroupPanel="True"   
                                            Telerik:StyleManager.Theme="Vista"   
                                            Name="NestedGridView" Margin="0,0,0,0"   
                                            CanUserReorderColumns="True" 
                                            CanUserSortColumns="True" 
                                            ColumnsWidthMode="Auto" 
                                            Background="#FF525252" 
                                            ItemsSource="{Binding MasterRecord.Data.Orders}">  
                                        </Telerik:RadGridView> 
                                          
                                    </Telerik:RadTabItem> 
 
                                    <Telerik:RadTabItem   
                                            BorderThickness="2"   
                                            Height="30" 
                                            VerticalAlignment="Center"   
                                            SnapsToDevicePixels="True"   
                                            HorizontalContentAlignment="Stretch"   
                                            HorizontalAlignment="Left" 
                                            Telerik:StyleManager.Theme="Vista" 
                                            Header="Performance Chart">  
 
                                        <Grid Margin="0,2,0,0" Background="#FF525252">  
                                            <chart:RadChart x:Name="radChartSales"   
                                                            Height="268"                                                              
                                                            VerticalContentAlignment="Stretch" 
                                                            HorizontalAlignment="Stretch"/>  
                                        </Grid> 
                                    </Telerik:RadTabItem> 
                                      
                                      
                                      
                                    <Telerik:RadTabItem BorderThickness="2" Header="RadTabItem"/>  
                                      
                                </Telerik:RadTabControl> 
 
                            </Grid> 
                            <!--</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"   
                             Background="#FF525252" 
                             Margin="0,0,0,12" ColumnsWidthMode="Fill" /> 
 
        <!--Background="{StaticResource TabItemButtonBrush}"--> 
 
 
    </Grid> 
</Window> 
 

 What problems I have??:

1. RadChart
- I do not have any data yet - did not populated that yet , but since there is no data , the framework shows a rectangle with "No Data Series", which is inside a rectangle. I could not align that in the centre vertically and horizontally. (That is explained in my atatched image)


2.  Please visit the atatched images ... They explain every thing - I wrote there what problems I have.

Hope that you can answer as soon as possible.


I am using Visual Studio 2008 pro , Windows 7 Ultimate .
I am using LINQ to SQL (NorthWind Database)....


Thank you so much













Tags
GridView
Asked by
Wael Slaman
Top achievements
Rank 1
Answers by
Stefan Dobrev
Telerik team
Wael Slaman
Top achievements
Rank 1
Share this question
or