Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7509611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:58:04+00:00 2026-05-29T22:58:04+00:00

I have a DataTemplate: <Style x:Key=SalesmanDestinyReportListBoxStyle TargetType=ListBox> <Setter Property=ItemsPanel> <Setter.Value> <ItemsPanelTemplate> <StackPanel Orientation=Horizontal />

  • 0

I have a DataTemplate:

  <Style x:Key="SalesmanDestinyReportListBoxStyle" TargetType="ListBox">
            <Setter Property="ItemsPanel">
                <Setter.Value>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal" />
                    </ItemsPanelTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ListBox">
                        <ItemsPresenter />
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="ItemTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <telerik:RadGridView x:Name="grdSalesmanDestinyReport" Width="180" SelectionMode="Single" IsReadOnly="False" IsFilteringAllowed="True"
                     VerticalAlignment="Stretch" RowIndicatorVisibility="Collapsed" HorizontalAlignment="Stretch"
                     CanUserDeleteRows="False" CanUserInsertRows="False" CanUserReorderColumns="False" ItemsSource="{Binding Scores}" AutoGenerateColumns="False">
                           <i:Interaction.Behaviors>
                                <Binding:ColumnGroupsBehavior>
                                    <Binding:ColumnGroupsBehavior.CommonHeaders>
                                        <Binding:CommonHeader StartColumnIndex="0" Caption="{Binding Path=DataContext.SalesmanName,ElementName=grdSalesmanDestinyReport}" ColumnSpan="3" />
                                    </Binding:ColumnGroupsBehavior.CommonHeaders>
                                </Binding:ColumnGroupsBehavior>
                            </i:Interaction.Behaviors>
                            <telerik:RadGridView.Columns>
                                <telerik:GridViewDataColumn DataMemberBinding="{Binding Current}" IsReadOnly="True"
                             Header="{Binding Current}" Width="60">
                                    <telerik:GridViewDataColumn.CellTemplate>
                                        <DataTemplate>
                                            <TextBlock Text="{Binding Current}">

                                            </TextBlock>
                                        </DataTemplate>
                                    </telerik:GridViewDataColumn.CellTemplate>
                                </telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn DataMemberBinding="{Binding Destiny}" IsReadOnly="True"
                             Header="{Binding Current}" Width="60">
                                    <telerik:GridViewDataColumn.CellTemplate>
                                        <DataTemplate>
                                            <TextBlock Text="{Binding Destiny}">

                                            </TextBlock>
                                        </DataTemplate>
                                    </telerik:GridViewDataColumn.CellTemplate>
                                </telerik:GridViewDataColumn>

                                <telerik:GridViewDataColumn DataMemberBinding="{Binding Best}" IsReadOnly="True"
                             Header="{Binding Current}" Width="60">
                                    <telerik:GridViewDataColumn.CellTemplate>
                                        <DataTemplate>
                                            <TextBlock Text="{Binding Best}">

                                            </TextBlock>
                                        </DataTemplate>
                                    </telerik:GridViewDataColumn.CellTemplate>
                                </telerik:GridViewDataColumn>

                            </telerik:RadGridView.Columns>
                        </telerik:RadGridView>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>

here is a source class:

public class SalesmanDestinyReport
    {
        [DataMember]
        public List<Score> Scores { get; set; }

        [DataMember]
        public string SalesmanName { get; set; }
    }

and I have a problem with this piece of code:

                       <i:Interaction.Behaviors>
                            <Binding:ColumnGroupsBehavior>
                                <Binding:ColumnGroupsBehavior.CommonHeaders>
                                    <Binding:CommonHeader StartColumnIndex="0" Caption="{Binding Path=DataContext.SalesmanName,ElementName=grdSalesmanDestinyReport}" ColumnSpan="3" />
                                </Binding:ColumnGroupsBehavior.CommonHeaders>
                            </Binding:ColumnGroupsBehavior>
                        </i:Interaction.Behaviors>

The problem is that I can’t pass SalesmanName property to

   <Binding:CommonHeader StartColumnIndex="0" Caption="{Binding Path=DataContext.SalesmanName,ElementName=grdSalesmanDestinyReport}" ColumnSpan="3" />

I think that there is no need to explain wthat’s the CommonHeader, because the problem I believe lays in another place, but just in case:

http://blogs.telerik.com/pavelpavlov/posts/09-12-04/adding-additional-power-to-radgridview-for-silverlight-with-attached-behaviors.aspx

What I need to change in my binding declaration to display SalesmanName ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T22:58:06+00:00Added an answer on May 29, 2026 at 10:58 pm

    From scratch – Silverlight 4 does not support bindings in Style Setters (this functionality is now available in SL5). For SL4 there is a workaround: SetterValueBindingHelper.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Style which looks like this: <Style x:Name=SomeListBoxStyle TargetType=ListBox> <Setter Property=Template> <Setter.Value>
I have the next code in my view: <Style x:Key=documentFileNameStyle> <Setter Property=TextBlock.Foreground Value=Gray/> <Style.Triggers>
I have a DataGrid style in App.xaml: <Style TargetType={x:Type DataGrid}> <Setter Property=Foreground Value={StaticResource DataGridItemTextBrush}
I have this: <ListBox x:Name=PART_lstAttributes Grid.Row=1 Style={StaticResource GlossyBlackListBox}> <ListBox.ItemTemplate> <DataTemplate> <StackPanel> <TextBlock x:Name=txtAttributeName Text={Binding
I have a Listbox DataTemplate which looks like this <DataTemplate> <StackPanel Margin=0,24,0,24> <StackPanel toolkit:TiltEffect.IsTiltEnabled=true>
So I have the following DataTemplate for a ListBox.ItemTemplate : <DataTemplate x:Key=Tweet> <Grid> <Grid.ColumnDefinitions>
I have the following Data template with triggers: <DataTemplate.Triggers> <DataTrigger Binding={Binding IsCalled} Value=Yes> <Setter
I have the following ListView: <ListView Name=listView> <ListView.View> <GridView> <GridView.ColumnHeaderContainerStyle> <Style TargetType={x:Type GridViewColumnHeader}> <Setter
I have DataTemplate containing a TextBox . I'm setting this template to a listbox
I have a DataTemplate which contains a CheckBox and ListBox. When the CheckBox is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.