Hierarchical Column Group Merger

7 posts, 1 answers
  1. Roby
    Roby avatar
    4 posts
    Member since:
    Jan 2012

    Posted 20 Jan 2012 Link to this post

    In the winforms ColumnGroupsViewDefinition creates a Hierarchical Column Group Merger as in the URL http://www.telerik.com/help/winforms/gridview-viewdefinitions-column-groups-view.html.  Is there anyway to do it in SilverLight that can reproduce the same effect? 
  2. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 20 Jan 2012 Link to this post

    Hi Roby,

    Are you looking for something like this one  ?

    Regards,
    Pavel Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Roby
    Roby avatar
    4 posts
    Member since:
    Jan 2012

    Posted 20 Jan 2012 Link to this post

    Hi Pavel,

    Thank you for the very quick response,

    Yes I am able to acheive what you have shared but I need one more level of column grouping on top of Vehicle, Engine, Price and that is what I could not achieve. That is, I should be able to group Vehicle and Engine under one common group header and Price and other columns under one header.

    I have used the following code achieve one level of column header grouping and it is working fine. Please find the attached screen shot. Now, I would like to make one level of column grouping header but that is not happening - Personal and Others under one & Business and Dates under one.

     

     

     

    <telerik:RadGridView Name="radGridView1" MinHeight="100" Visibility="Visible" IsReadOnly="False" AutoGenerateColumns="False"

     

     

     

    CanUserFreezeColumns="True" CanUserReorderColumns="True" RowIndicatorVisibility="Collapsed"

     

     

     

    ItemsSource="{Binding Data, ElementName=employeeDataSource}">

     

     

     

     

    <telerik:RadGridView.RowStyleSelector>

     

     

     

     

    <telerik:ConditionalStyleSelector>

     

     

     

     

    <telerik:StyleRule Condition="EmployeeID &lt; 11">

     

     

     

     

    <telerik:StyleRule.Style>

     

     

     

     

    <Style TargetType="telerik:GridViewRow">

     

     

     

     

    <Setter Property="IsEnabled" Value="False" />

     

     

     

     

    </Style>

     

     

     

     

    </telerik:StyleRule.Style>

     

     

     

     

    </telerik:StyleRule>

     

     

     

     

    </telerik:ConditionalStyleSelector>

     

     

     

     

    </telerik:RadGridView.RowStyleSelector>

     

     

     

     

    <telerik:RadGridView.ColumnGroups>

     

     

     

     

     

    <telerik:GridViewColumnGroup Name="Personal" Header="Personal" />

     

     

     

     

    <telerik:GridViewColumnGroup Name="Others" Header="Others" />

     

     

     

     

    <telerik:GridViewColumnGroup Name="Business" Header="Business" />

     

     

     

     

    <telerik:GridViewColumnGroup Name="Dates" Header="Dates" />

     

     

     

     

     

    </telerik:RadGridView.ColumnGroups>

     

     

     

     

    <telerik:RadGridView.Columns>

     

     

     

     

    <telerik:GridViewDataColumn DataMemberBinding="{Binding EmployeeID}" ColumnGroupName="Personal" />

     

     

     

     

    <!--<telerik:GridViewDataColumn DataMemberBinding="{Binding NationalIDNumber}" ColumnGroupName="Personal" />-->

     

     

     

     

    <!--<telerik:GridViewDataColumn DataMemberBinding="{Binding ContactID}" ColumnGroupName="Personal" />-->

     

     

     

     

    <telerik:GridViewDataColumn DataMemberBinding="{Binding LoginID}" ColumnGroupName="Personal" />

     

     

     

     

    <telerik:GridViewDataColumn DataMemberBinding="{Binding MaritalStatus}" ColumnGroupName="Personal" />

     

     

     

     

    <telerik:GridViewDataColumn DataMemberBinding="{Binding Gender}" ColumnGroupName="Personal" />

     

     

     

     

    <telerik:GridViewDataColumn DataMemberBinding="{Binding BirthDate}" ColumnGroupName="Others" />

     

     

     

     

    <!--<telerik:GridViewDataColumn DataMemberBinding="{Binding SalariedFlag}" ColumnGroupName="Business" />-->

     

     

     

     

    <telerik:GridViewDataColumn DataMemberBinding="{Binding VacationHours}" ColumnGroupName="Business" />

     

     

     

     

    <telerik:GridViewDataColumn DataMemberBinding="{Binding SickLeaveHours}" ColumnGroupName="Business" />

     

     

     

     

    <!--<telerik:GridViewDataColumn DataMemberBinding="{Binding CurrentFlag}" ColumnGroupName="Business" />-->

     

     

     

     

    <!--<telerik:GridViewDataColumn DataMemberBinding="{Binding rowguid}" ColumnGroupName="Business" />-->

     

     

     

     

    <telerik:GridViewDataColumn DataMemberBinding="{Binding ManagerID}" ColumnGroupName="Business" />

     

     

     

     

    <telerik:GridViewDataColumn DataMemberBinding="{Binding Title}" ColumnGroupName="Business" />

     

     

     

     

    <telerik:GridViewDataColumn DataMemberBinding="{Binding HireDate}" ColumnGroupName="Dates" />

     

     

     

     

    <telerik:GridViewDataColumn DataMemberBinding="{Binding ModifiedDate}" ColumnGroupName="Dates" />

     

     

     

     

    <telerik:GridViewDataColumn DataMemberBinding="{Binding BirthDate}" ColumnGroupName="Dates" />

     

     

     

     

    </telerik:RadGridView.Columns>

     

     

     

     

    </telerik:RadGridView>

    I hope something would be there to acheiving my requirement. Pleaes help me out. Thank you.

     

  4. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 25 Jan 2012 Link to this post

    Hello Roby ,

    I am attaching a small runnable project demonstrating how can you nest headers on 3 levels.

    *Please be sure to download the binaries  from our latest internal build as it contains some relevant fixes.

    Kind regards,
    Pavel Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  5. Roby
    Roby avatar
    4 posts
    Member since:
    Jan 2012

    Posted 31 Jan 2012 Link to this post

    Hi Pavel,

    Thank you for working on this. Here you have each group corresponding to each column and on top of that you have some more group levels. This way, I cannot use sort and filter options.

    I am just looking for grouping more than one column and grouping those groups into sub groups again and do the same for one more level. To understand this, I have attached one drawing,

    Thanks,
    Roby
  6. Answer
    Vera
    Admin
    Vera avatar
    268 posts

    Posted 31 Jan 2012 Link to this post

    Hello Roby,

    I have modified my colleague's sample project according to your requirements. Please, take a look at it. 
    In order to group two or more columns into one column group you only need to set their ColumnGroupName property to the same column group name.

    Let me know in case you need any further assistance.

    Kind regards,
    Vera
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  7. Roby
    Roby avatar
    4 posts
    Member since:
    Jan 2012

    Posted 31 Jan 2012 Link to this post

    Hi Veram

    Thanks a lot for this. This is what I am looking for. Thanks again.

    Thanks,
    Roby
Back to Top