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
790
How to GroupBy a column that represents XamComboEditor
posted

Hi

I want to group by a column that represents xamcomboeditor. When I drag drop such columns to groupby area, it displays group by text as full name of the type(including namespace), rather cell text.

Please help.

Please see the attached screenshot for the result...

Code:

<Style TargetType="{x:Type igDataPresenter:CellValuePresenter}" x:Key="ServiceDomainEditorStyle">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type igDataPresenter:CellValuePresenter}">
<controls:SelectionEditor DockPanel.Dock="Top"
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Value, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Path=DataContext.Domains, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, RelativeSource = {RelativeSource FindAncestor, AncestorType= UserControl}}"
DisplayMemberPath="Name" SelectedText="Name"
IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DomainEditabilityToBoolConverter}}"
ChangeStartedCommand="{Binding DataContext.ArticleGuiCommandHandler.EditStartedCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type igDataPresenter:XamDataGrid}}}"
ChangeStartedCommandParameter="{Binding DataItem.Item}"
ChangeCompletedCommand="{Binding DataContext.ArticleGuiCommandHandler.ChangeCompletedCommand, RelativeSource = {RelativeSource FindAncestor, AncestorType={x:Type igDataPresenter:XamDataGrid}}}"
ChangeCompletedCommandParameter="{Binding DataItem.Item}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

In FieldLayout:

<igDataPresenter:Field Label="Domain" Name="Item.Domain" AlternateBinding="{Binding Path=Item.Item.Domain, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" CellValuePresenterStyle="{StaticResource ServiceDomainEditorStyle}" GroupByMode="Text" AllowGroupBy="True"/>

Thanks,
Sreeni