I managed to solve my problem with a combination of another question here, and by stubbing in an empty item in my group.
So I stubbed in a false employee with empty data, and then adjusted my DataTemplate. The trick was taking the object's binding container and disabling it for items that matched a specific criteria.
public class CompanyTemplateSelector : DataTemplateSelector
{
protected override Windows.UI.Xaml.DataTemplate SelectTemplateCore(object item, Windows.UI.Xaml.DependencyObject container)
{
var containingItem = container as GridViewItem;
if (item is UserDetails)
{
UserDetails detail = (UserDetails)item;
if (detail.UserId == -1)
{
containingItem.IsEnabled = false;
return Empty;
}
else
{
containingItem.IsEnabled = true;
return DataPresent;
}
}
return DataPresent;
}
public DataTemplate DataPresent
{
get;
set;
}
public DataTemplate Empty
{
get;
set;
}
}
So my result is the following
and then after clicking the header