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

Issue in RadGridView ColumnGroup Header Binding

0 Answers 111 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sivakumar
Top achievements
Rank 1
Sivakumar asked on 23 Jun 2013, 04:47 AM
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 ?


No answers yet. Maybe you can help?

Tags
GridView
Asked by
Sivakumar
Top achievements
Rank 1
Share this question
or