Hello, we're trying to style the XCeed WPF datagrid so it has a consistent look with the rest of our application and it was decided to try to hide the grouped rows in the Datagrid. Basically our user interface developer created a style that targets the type GroupHeaderControl which is what shows up when you group something. He created a converter:
<Style TargetType="{x:Type xcdg:GroupHeaderControl}">
<Setter Property="Visibility" Value="{Binding RelativeSource={RelativeSource Self}, Path=Group, Converter={StaticResource myVisibilityConverter}}" />
That sets the visibility of the various GroupHeaders based on the IsBottomLevel property of the Xceed.Wpf.DataGrid.Group.
class myVisibilityConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value == null)
return null;
if ((value as Xceed.Wpf.DataGrid.Group) == null)
return null;
if ((value as Xceed.Wpf.DataGrid.Group).IsBottomLevel)
{
return Visibility.Visible;
}
Group group = (Group)value;
return Visibility.Hidden;
}
This seems to work fine in hiding the actual rows in the Datagrid but then i'm left with large white gaps where the hidden rows should have been.
(tried to attach image of the sample project showing the issue, but it doesn't seem to be working)
http://s18.postimage.org/jzgzcr515/Datagrid.png
Any ideas on how to fix this issue would be welcome.
Thanks in advance,
--Jake