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

="{Binding Path=DisplayContent}" doesn't get any value

7 Answers 104 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Elena
Top achievements
Rank 1
Elena asked on 15 Jun 2011, 08:26 AM

Hi,
Jag have an existing Custom Theme for RadGridView which is not entire correct because in
<ControlTemplate x:Key="GridViewGroupPanelItemTemplate" TargetType="grid:GridViewGroupPanelItem">
Content
="{Binding Path=DisplayContent}" doesn't get any value. I think it something is missing in our GridViewTheme.xaml. Would be very grateful for any tip.
Best regards
Elena


<ControlTemplate x:Key="GridViewGroupPanelItemTemplate" TargetType

="grid:GridViewGroupPanelItem">

 

  <StackPanel x:Name="PART_GroupPanelItemStackPanel" Orientation="Horizontal"
    VerticalAlignment="{TemplateBinding VerticalContentAlignment}" 
        Background="Transparent">
    <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment }"> 

        <Grid.RowDefinitions>
            <RowDefinition MinHeight="4" Height ="Auto" /> <RowDefinition />
        </Grid.RowDefinitions>

        <Path Name="PART_InsertionPoint" Grid.Row="0" Visibility="Collapsed"
        
Fill="{StaticResource GridView_IndicatorPrimaryColor}" Stretch="Fill" 
        
VerticalAlignment="Top" HorizontalAlignment="Center" Width="6.414" 
        Height
="4.677" 
        Data
="M206.66812,170.31108 L212.08199,170.31108 209.36058,173.98834 z" />
        
<Grid x:Name="PART_ConnectingLine" Visibility="Visible" Grid.Row="1" 
        Margin
="{TemplateBinding Padding}">
            <Path Fill="{StaticResource GridView_IndicatorSecondaryColor}" 
            Stretch
="Fill" Stroke="{x:Null}" Width="4" Height="7"  Margin="1,2,0,0"
            Data
="M0,0 L1,0 1,1 2,1 2,2 3,2 3,3 4,3 4,4 3,4 3,5 2,5 2,6 1,6 1,7 0,7 z"/>

            <Path Fill="{StaticResource GridView_IndicatorPrimaryColor}" Stretch="Fill"
            Stroke="{x:Null}" Width="4" Height="7" 
            Data
="M0,0 L1,0 1,1 2,1 2,2 3,2 3,3 4,3 4,4 3,4 3,5 2,5 2,6 1,6 1,7 0,7 z"/>

        </Grid>
    </Grid>
    <Border BorderBrush="{StaticResource GridView_HeaderInnerBorder}"
       Background
="{TemplateBinding Background}" BorderThickness="1" CornerRadius="3" 
        
Margin="5,0">
        <grid:GridViewGroupPanelCell Background="Transparent" BorderThickness="0" 
       
Content="{Binding Path=DisplayContent}" Foreground="Black" Padding="12,0,12,2" 
       
SortDirection="{Binding Path=SortDirection}"/>
    
</Border>
</StackPanel>
</ControlTemplate

>

 

 

 

 

7 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 16 Jun 2011, 01:24 PM
Hello Elena,

Thank you for this feedback. I have reproduced the behavior that you experience. You may fix this by using "Column.Header" instead of DisplayContent. They are returning one and the same value.

<telerik:GridViewGroupPanelCell Content="{Binding Column.Header}"  />

We are going to investigate further what would be causing this strange behavior with the binding to the DisplayContent.  Greetings,
Didie
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Elena
Top achievements
Rank 1
answered on 16 Jun 2011, 01:40 PM
Thank you sa much!
 I will test your advice tomorrow because of DataBase problem. After Windows updatings SQL Server doesn't start and I can't debug/start my project :(. 
Yours truly.
Elena
0
Oliver
Top achievements
Rank 1
answered on 22 Jan 2013, 04:10 PM
Hy,

I've got the same problem...

This isn't work:

<telerik:GridViewGroupPanelCell Content="{Binding Column.Header}"  />

<telerik:GridViewGroupPanelCell
                Content="{Binding Path=DisplayContent}"
                Style="{StaticResource GridViewGroupPanelCellStyle}"
                SortDirection="{Binding Path=SortDirection}" />
 To:

<telerik:GridViewGroupPanelCell
                Content="{TemplateBinding Content}"
                Style="{StaticResource GridViewGroupPanelCellStyle}"
                SortDirection="{Binding Path=SortDirection}" />

Would be very grateful for any tip, too :-)


Thanks

Olli
0
Dimitrina
Telerik team
answered on 22 Jan 2013, 04:15 PM
Hi,

Have you tried the following:

<telerik:GridViewGroupPanelCell
     Content="{TemplateBinding Content.Header}"
     Style="{StaticResource GridViewGroupPanelCellStyle}"
     SortDirection="{Binding Path=SortDirection}" />

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Oliver
Top achievements
Rank 1
answered on 22 Jan 2013, 05:17 PM
Hy Didie,

yes, but isn't works too...

Do you have a any idea?


<telerik:GridViewGroupPanelCell
     Content="{TemplateBinding Content.Header}"
     Style="{StaticResource GridViewGroupPanelCellStyle}"
     SortDirection="{Binding Path=SortDirection}" />

--> In VS 2010 comes this error:
Type 'Content' was not found. 

Thanks
0
Elena
Top achievements
Rank 1
answered on 22 Jan 2013, 06:59 PM

Hi,

It was long time ago. Try this. It works for me.

              <grid:GridViewGroupPanelCell

                                                              Background="Transparent"

                                                              BorderThickness="0"

                                                              Content="{Binding Column.Header}"

                                                              Foreground="#204d89"

                                                              Padding="12,0,12,2"

                                                              SortDirection="{Binding Path=SortDirection}"/>

0
Oliver
Top achievements
Rank 1
answered on 23 Jan 2013, 09:57 AM
Hy,

@Elena
            It was long time ago
yeah  :-)


This will works for me:

<grid:GridViewGroupPanelCell
        FontSize="{StaticResource FontSizeGridViewHeaderGroup}"
        Foreground="{StaticResource BaseForeground}"
        Content="{Binding Column.Header}"
        Padding="12,3,12,2" Height="24"
        SortDirection="{Binding Path=SortDirection}"
        Style="{StaticResource GridViewGroupPanelCellStyle}" />


The problem was my style definition (GridViewGroupPanelCellStyle), this was corrupt...


Thanks all for support...

Best Regards
Olli
Tags
GridView
Asked by
Elena
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Elena
Top achievements
Rank 1
Oliver
Top achievements
Rank 1
Share this question
or