This question is locked. New answers and comments are not allowed.
Hi,
Using the Datagridview to collect datas, I try to create a second gridview filled with the details (the main datagridview contains 6 columns and I want to sum it up to a 2 columns details gridview, with each row on column 1 containing the header of each of the main datagridview, and each row on column 2 containing the datas).
I thought the DetailsPresenter could help me doing that. Am I wrong ?
And By the way, I can display the so called Details Presenter but the drag & drop function doesn't even work. Why ?
Here is my code :
Thanks in advance
Using the Datagridview to collect datas, I try to create a second gridview filled with the details (the main datagridview contains 6 columns and I want to sum it up to a 2 columns details gridview, with each row on column 1 containing the header of each of the main datagridview, and each row on column 2 containing the datas).
I thought the DetailsPresenter could help me doing that. Am I wrong ?
And By the way, I can display the so called Details Presenter but the drag & drop function doesn't even work. Why ?
Here is my code :
Thanks in advance
| <Grid x:Name="LayoutRoot" Theme:StyleManager.Style="Grid_Background_Style"> |
| <Grid> |
| <Grid.RowDefinitions> |
| <RowDefinition Height="100"/> |
| <RowDefinition Height="150"/> |
| <RowDefinition Height="*"/> |
| </Grid.RowDefinitions> |
| <Border Theme:StyleManager.Style="Border_MenuBar_Style" Grid.Row="0"> |
| <!-- MYCODE--> |
| </Border> |
| <Border Grid.Row="1" Theme:StyleManager.Style="Grid_Background_Style"> |
| <Grid> |
| <Grid Theme:StyleManager.Style="Grid_Background_Style"> |
| <StormGridView:StormGridView ItemsSource="{Binding Path=Downloads}" x:Name="QCDetails" |
| AutoGenerateColumns="False" IsReadOnly="True" ShowGroupPanel="False"> |
| <StormGridView:StormGridView.Columns> |
| <StormGridView:StormGridViewColumn Header="Name" HeaderTextAlignment="Center" Width="120" > |
| <StormGridView:StormGridViewColumn.CellTemplate> |
| <DataTemplate> |
| <StackPanel Orientation="Horizontal"> |
| <HyperlinkButton Content="{Binding Path=QualityControlName}" Click="HyperlinkButton_Click"></HyperlinkButton> |
| </StackPanel> |
| </DataTemplate> |
| </StormGridView:StormGridViewColumn.CellTemplate> |
| </StormGridView:StormGridViewColumn> |
| <StormGridView:StormGridViewColumn Header="Description" TextAlignment="Center" HeaderTextAlignment="Center" Width="300" > |
| <StormGridView:StormGridViewColumn.CellTemplate> |
| <DataTemplate> |
| <StackPanel Orientation="Horizontal"> |
| <TextBlock Text="{Binding Path=QualityControlDescription}" TextWrapping="Wrap" TextAlignment="Center" Width="250"> |
| </TextBlock> |
| </StackPanel> |
| </DataTemplate> |
| </StormGridView:StormGridViewColumn.CellTemplate> |
| </StormGridView:StormGridViewColumn> |
| <StormGridView:StormGridViewColumn Header="Type" TextAlignment="Center" HeaderTextAlignment="Center" Width="120"> |
| <StormGridView:StormGridViewColumn.CellTemplate> |
| <DataTemplate> |
| <StackPanel Orientation="Horizontal"> |
| <TextBlock Text="{Binding Path=QualityControlType}" TextAlignment="Center"></TextBlock> |
| </StackPanel> |
| </DataTemplate> |
| </StormGridView:StormGridViewColumn.CellTemplate> |
| </StormGridView:StormGridViewColumn> |
| <StormGridView:StormGridViewColumn Header="Severity" TextAlignment="Center" HeaderTextAlignment="Center" Width="120"> |
| <StormGridView:StormGridViewColumn.CellTemplate> |
| <DataTemplate> |
| <StackPanel Orientation="Horizontal"> |
| <TextBlock Text="{Binding Path=QualityControlSeverity}" TextAlignment="Center"></TextBlock> |
| </StackPanel> |
| </DataTemplate> |
| </StormGridView:StormGridViewColumn.CellTemplate> |
| </StormGridView:StormGridViewColumn> |
| <StormGridView:StormGridViewColumn Header="Synopsis" TextAlignment="Center" HeaderTextAlignment="Center" Width="300" > |
| <StormGridView:StormGridViewColumn.CellTemplate> |
| <DataTemplate> |
| <StackPanel Orientation="Horizontal"> |
| <TextBlock Text="{Binding Path=QualityControlSynopsis}" TextAlignment="Center" Width="250" TextWrapping="Wrap"></TextBlock> |
| </StackPanel> |
| </DataTemplate> |
| </StormGridView:StormGridViewColumn.CellTemplate> |
| </StormGridView:StormGridViewColumn> |
| <StormGridView:StormGridViewColumn Header="Timecode" TextAlignment="Center" HeaderTextAlignment="Center" Width="120"> |
| <StormGridView:StormGridViewColumn.CellTemplate> |
| <DataTemplate> |
| <StackPanel Orientation="Horizontal"> |
| <TextBox Text="{Binding Path=QualityControlTimecode}" TextAlignment="Center" IsReadOnly="True"></TextBox> |
| </StackPanel> |
| </DataTemplate> |
| </StormGridView:StormGridViewColumn.CellTemplate> |
| </StormGridView:StormGridViewColumn> |
| </StormGridView:StormGridView.Columns> |
| </StormGridView:StormGridView> |
| </Grid> |
| </Grid> |
| </Border> |
| <Border Grid.Row="2" Theme:StyleManager.Style="Grid_Background_Style" HorizontalAlignment="Left"> |
| <Grid> |
| <!-- SELECTED ELEMENT DETAILS --> |
| <StackPanel Orientation="Horizontal"> |
| <StackPanel Orientation="Vertical"> |
| <dataInput:Label Content="Selected Element" Foreground="White"/> |
| </StackPanel> |
| <StackPanel Orientation="Vertical"> |
| <StackPanel.Resources> |
| <DataTemplate x:Key="myRowDetailsTemplate"> |
| <TextBlock Text="Selected Element" /> |
| </DataTemplate> |
| </StackPanel.Resources> |
| <telerikGridView:RadGridView x:Name="grid" RowDetailsVisibilityMode="Collapsed" RowDetailsTemplate="{StaticResource myRowDetailsTemplate}"> |
| </telerikGridView:RadGridView> |
| <GridView:DetailsPresenter x:Name="externalDetailsPresenter"/> |
| </StackPanel> |
| <!-- MEDIA --> |
| <StackPanel Orientation="Vertical" VerticalAlignment="Bottom"> |
| <!--MY CODE AGAIN --> |
| </StackPanel> |
| </StackPanel> |
| </Grid> |
| </Border> |
| </Grid> |
| </Grid> |