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

8 posts, 0 answers
  1. Elena
    Elena avatar
    8 posts
    Member since:
    Jun 2011

    Posted 15 Jun 2011 Link to this post

    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

    >

     

     

     

     

  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 16 Jun 2011 Link to this post

    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
  3. Elena
    Elena avatar
    8 posts
    Member since:
    Jun 2011

    Posted 16 Jun 2011 Link to this post

    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
  4. Oliver
    Oliver avatar
    3 posts
    Member since:
    Nov 2012

    Posted 22 Jan 2013 Link to this post

    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
  5. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 22 Jan 2013 Link to this post

    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.

  6. Oliver
    Oliver avatar
    3 posts
    Member since:
    Nov 2012

    Posted 22 Jan 2013 Link to this post

    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
  7. Elena
    Elena avatar
    8 posts
    Member since:
    Jun 2011

    Posted 22 Jan 2013 Link to this post

    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}"/>

  8. Oliver
    Oliver avatar
    3 posts
    Member since:
    Nov 2012

    Posted 23 Jan 2013 Link to this post

    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
Back to Top