Hello,
I believe that this topic has already been discussed in the following forum thread:
http://forums.infragistics.com/forums/t/66900.aspx
Please do not hesitate to contact us if you need any additional assistance.
I have sorted out that issue thanks for your try
Below i have posted one pic.My need to to hide that zero value .can u help me
I am checking about the progress of this issue. Please let me know If you need any further assistance on this.
Hi,
You would have to use a CreationFilter to do this.But it will be pretty tricky.
First, you will need to create summary and align it to the "Classification column". This is just so you have a TextUIElement in the summary area so you can put your own custom text in it.
But, you don't want this summary to display in the GroupByRow, so you need to set it up so it only displays at the bottom.
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { UltraGridLayout layout = e.Layout; UltraGridBand band = layout.Bands[0]; UltraGridOverride ov = layout.Override; layout.ViewStyleBand = ViewStyleBand.OutlookGroupBy; band.SortedColumns.Add("Tool #", false, true); ov.GroupBySummaryDisplayStyle = GroupBySummaryDisplayStyle.SummaryCells; UltraGridColumn classificationColumn = band.Columns["Classification"]; SummarySettings summarySettings = band.Summaries.Add("GroupByDescriptionSummary", SummaryType.Count, classificationColumn); summarySettings.SummaryDisplayArea = SummaryDisplayAreas.Bottom; }
So now you have a summary which shows the count, but not the GroupByRow value like you want. That's where the CreationFilter comes in.
public class GroupByDescriptionSummaryCreationFilter : IUIElementCreationFilter { #region IUIElementCreationFilter Members void IUIElementCreationFilter.AfterCreateChildElements(UIElement parent) { // Do nothing } bool IUIElementCreationFilter.BeforeCreateChildElements(UIElement parent) { // Watch for a TextUIElement TextUIElement textUIElement = parent as TextUIElement; if (parent is TextUIElement) { // Try to get a SummaryValue from the TextUIElement. SummaryValue summaryValue = parent.GetContext(typeof(SummaryValue)) as SummaryValue; if (summaryValue != null) { // We got one, not make sure it's the right one. if (summaryValue.Key == "GroupByDescriptionSummary") { // It is the right one. So now get the GroupByRow that is the parent of the // summariy's rows collection. UltraGridGroupByRow groupByRow = summaryValue.ParentRows.ParentRow as UltraGridGroupByRow; if (null != groupByRow) { // Change the summary text to the GroupByRow's value. textUIElement.Text = groupByRow.Value.ToString(); } } } } return false; } #endregion }