Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
780
Grouping by HyperlinkColumn shows Key even if ContentBinding set.
posted

If I have a HyperlinkColumn that uses the ContentBinding to change the display text of the URL, and then group by that column, the Url (Key) is shown, not the ContentBinding.

For example:

<

 

igDataGrid:HyperlinkColumn Key="Url" ContentBinding="{Binding Name}" TargetName="_blank" />

If I use this, in the grid, ungrouped, I see the product Name field with the link going to the Url field, which is great.  But when I group by this column, the group header shows the Url.

Is there any way to change this behavior?  I tried with a ValueConverter, but the "value" being passed is already the Url, so I can't do anything about it at that point. 

Thanks,
Keith

Parents
  • 40030
    Offline posted

    Hi Keith,

    Every Column object in the XamWebGrid has a property called GroupByItemTemplate.  Which can be used to customize the content displayed in a GroupByRow. 

    The DataContext of this DataTemplate is of type GroupByDataContext which has the following properties:

    Value, Records, and Count. 

    The following help article goes into more detail on how to use the GroupByItemTemplate and even contains some sample code. 

    Custom GroupByRow Display

    Hope this helps.

    -SteveZ

Reply Children
No Data