I have a customer that runs a older VB Winforms application where they have Infragistics datagrid that I want to convert to WPF XamDataGrid in C#. The customer want to have it looking the same way after grouping
that before Grouping looks like this
And After Grouping byt Annoncør it looks like this
Is it possible that you can attached an example ?
Hello Thomas,
Styling components in WPF will allow you to do that.
You can create a simple version of the groupByRecord presenter like this:
<Style TargetType="{x:Type igDP:GroupByRecordPresenter}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type igDP:GroupByRecordPresenter}">
<StackPanel Orientation="Horizontal">
<Image Source="pic.png" Width="30" Height="30"/>
<ContentControl Content="{Binding Path=Description,
RelativeSource={RelativeSource TemplatedParent}}"/>
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
This will add image to the record presenter, however by doing so most of the functionalities of the GroupByRecordPresenter will be lost(such as expansion indicator, etc.).
The groupByRecordPresenter have no contnentTemplate, so if you would like to modify it and keep all the current functionalities, you will need to get the default template which is located in the installation directory on your device, and keep modifying it from there. The location of the default styles should be something like this:
C:\Program Files (x86)\Infragistics\<version>\WPF\DefaultStyles\DataPresenter
Please let me know if you have any other questions or concerns on this matter.
Sincerely,Tihomir TonevAssociate Software DeveloperInfragistics