Merging Headers, or Hiding Header and leaving Group Headers?

9 posts, 0 answers
  1. Louis
    Louis avatar
    83 posts
    Member since:
    Aug 2013

    Posted 01 Oct 2013 Link to this post

    I'm looking for a way to have a single column header display above 2 grid columns, but all of the posts I've been able to find from searching seem out of date. I tried styling the headers to hide the line in between (not a good solution anyway, since I need the text to straddle the two header cells), but couldn't figure out how to make it visually match the existing header cells. I don't need the filtering or sorting capabilities in this grid, so even being able to turn off the header while leaving the ColumnGroup headers on would accomplish what I need, but ShowColumnHeaders turns both off.

    Is there a recommended approach to accomplish something like this?

    Thanks,
    Louis


  2. Nick
    Admin
    Nick avatar
    593 posts

    Posted 02 Oct 2013 Link to this post

    Hi Louis,

    You can take a look at the following example showing how you can achieve MergedColumnHeaders with RadGridView: http://demos.telerik.com/silverlight/#GridView/MergedColumnHeaders

    Hope this helps! 

    Regards,
    Nik
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Louis
    Louis avatar
    83 posts
    Member since:
    Aug 2013

    Posted 02 Oct 2013 Link to this post

    Hi Nik, thank you for responding. This is not quite what I need in that I need just the top (group) row visible (Vehicle, Engine, Price), and need to be able to hide the bottom (column header) row hidden (Make, Model, Variant, etc.), as I referred to in my post. Is there a way to hide the column header but leave the group header visible?

    Thanks,
    Louis
  5. Nick
    Admin
    Nick avatar
    593 posts

    Posted 07 Oct 2013 Link to this post

    Hello Louis,

    Unfortuantely, you cannot show just the MergedColumnHeaders, without the ColumnHeaders, since they are both a part of the HeaderRow as a whole. We are going to put this feature into consideration for our future releases. You can check the release notes to see if it has been introduced.

    Hope this helps! 

    Regards,
    Nik
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  6. Louis
    Louis avatar
    83 posts
    Member since:
    Aug 2013

    Posted 07 Oct 2013 Link to this post

    Ok, thanks Nik. Would it be possible to get the right header styling to make 2 column headers look like one? (Similar to what was provided for footers here:)

    http://www.telerik.com/community/forums/wpf/gridview/merge-footer-cells.aspx

    I've tried coming up with the formatting myself, but have been unable to achieve the right look in the headers.

    Thanks again,
    Louis
  7. Nick
    Admin
    Nick avatar
    593 posts

    Posted 10 Oct 2013 Link to this post

    Hello Louis,

    The easiest way would be to create a cell template for a column that will contain the values from two properties under a single header.

    Hope this helps! 

    Regards,
    Nik
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  8. Louis
    Louis avatar
    83 posts
    Member since:
    Aug 2013

    Posted 10 Oct 2013 Link to this post

    Is there a Telerik component I can use to make the column match the functionality of the entry provided by the GridViewDataColumn? If I use a standard WPF component within the DataTemplate, I end up with an inconsistent look and feel between my templated pair of columns and normal GridViewDataColumns.

    Thanks,
    Louis
  9. Nick
    Admin
    Nick avatar
    593 posts

    Posted 11 Oct 2013 Link to this post

    Hi Louis,

    Almost all of the controls used in the GridView are part of our bundle. For example, the ComboBoxColumn uses RadComboBox, the DateTimePickerColumn uses RadDateTimePicker, etc. 
    The plain view of the cell uses a Text Block while the EditMode is using a TextBox for the most part (SpecificColumns use specific controls, like DateTimePicker and ComboBox).

    Hope this helps! 

    Regards,
    Nik
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  10. Louis
    Louis avatar
    83 posts
    Member since:
    Aug 2013

    Posted 11 Oct 2013 Link to this post

    Hi Nik,

    Thank you very much, the last part about EditMode pointed me in the right direction. I'm now able to get the look and feel I was looking for using the CellTemplate/CellEditTemplate.

    Louis
Back to Top
UI for WPF is Visual Studio 2017 Ready