Issue in RadGridView ColumnGroup Header Binding

1 posts, 0 answers
  1. Sivakumar
    Sivakumar avatar
    8 posts
    Member since:
    Jun 2013

    Posted 22 Jun 2013 Link to this post

    Hi,
    <UserControl>
         <telerik:RadGridView.ColumnGroups>
                                <telerik:GridViewColumnGroup Name="CommonID" Header="{Binding DataContext.ID, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}/>  
         </telerik:RadGridView.ColumnGroups>
      <telerik:RadGridView.Columns>
                   <telerik:GridViewDataColumn
    Header="{Binding DataContext.ID, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}
    DataMemberBinding="{Binding CID}" ColumnGroupName="CommonID"/>

    </telerik:RadGridView.Columns>
    </UserControl>

    ViewModel
    =========
    public string ID {get; set;}

    Model
    =====
    public string CID {get; set;}

    Output
    =======
    RadGrid :
    ------------------------------------------
           CommonID // but i need E001 here  [Column Group Header]
    -----------------------------
    E001       // column header
    ------------
    c101



    The binding is not working for ColumnGroup header. I have faced the same issue on Column header, but it is resolved using Datacontext.ID,relativesource....and Data is showing properly

    Can anyone help me out to resolve this ?


Back to Top