Custom group header text

2 posts, 0 answers
  1. Mirzodaler
    Mirzodaler avatar
    4 posts
    Member since:
    Feb 2016

    Posted 09 Jul Link to this post

    Hi,

    I want to change the default header text. For example I have following properties

    • Id
    • Title
    • Description

    If user will group it by Id, then I want to show group header text like [Id]:[Title]. How can I do this?

     

    Thanks, 

    Daler

     

     

  2. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    371 posts

    Posted 12 Jul Link to this post

    Hello Mirzodaler,

    Please have a look at the following forum threads where similar scenarios have been discussed:
    Group Header - row data in group header
    Setting DisplayContent property
    Group header with converter

    To sum them up, you should specify a custom template as the GroupHeaderTemplate of your RadGridView instance and modify that to your liking. Here's an example:

    <DataTemplate x:Key="GroupHeaderTemplate">
        <StackPanel Orientation="Horizontal">
            <TextBlock Text="{Binding Group.Key}" />
        </StackPanel>
    </DataTemplate>

    Bear in mind that the data context of this template is of type GroupViewModel.

    I hope you find this information helpful.

    Regards,
    Dilyan Traykov
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top