Is there any property to Hide the Group-By Row Header?
I mean the complete Group-by band.
It's a pretty simple CreationFilter as CreationFilters go. Here's some sample code I whipped up:
public class HideGroupByRowsCreationFilter : IUIElementCreationFilter { #region IUIElementCreationFilter Members void IUIElementCreationFilter.AfterCreateChildElements(UIElement parent) { if (parent is RowColRegionIntersectionUIElement) { // Cannot remove items from a collection while in a ForEach loop, so // build a list of the elements that need to be removed. List<UIElement> elementsToRemove = new List<UIElement>(); foreach (UIElement childElement in parent.ChildElements) { if (childElement is GroupByRowUIElement) elementsToRemove.Add(childElement); } // Now remove the GroupByRowUIElements from the RowColRegionIntersectionUIElement foreach (UIElement elementToRemove in elementsToRemove) { parent.ChildElements.Remove(elementToRemove); } } } bool IUIElementCreationFilter.BeforeCreateChildElements(UIElement parent) { //do nothing return false; } #endregion }
You will, of course, want to call ExpandAll on the rows collection of the grid any time there is grouping. Otherwise, the user won't be able to see the child rows.
Can you suggest how to create a CreationFilter to make it blank
I am guessing that you are talking about the GroupByRow. You can hide this row just like you would hide any other row, by setting the Hidden property to true.
However, I suspect that's not really what you want, since this will hide the child rows as well.
There's no way to hide the GroupByRow and still show the children... although, if you don't mind leaving a big space where the GroupByRow used to be, you could probably eliminate the display of the row by using a CreationFilter.