Hello,
in one of my projects I use the WinGrid which works really good. But I have one question left: How can I hide the item count in the group headers ("5 items")? I use OutlookGroupBy and add a sorted column in that way:
DisplayLayout.Bands[0].SortedColumns.Add(DisplayLayout.Bands[0].Columns[ColumnKey], false, true); // ColumnKey usually is "Tag"
best regards,Tobias
There are two possible approaches here.
The first and easiest approach is to set the GroupByDescriptionMask property (linking to online API documentation for this property in NetAdvantage for .NET 2008 Volume 3) on the appropriate Override object. This help article provides more details of what information you can provide using tokens.
The second approach is to handle the grid's InitializeGroupByRow event and set the Description on the e.Row parameter. You can't use the same token substitution as you can on the GroupByDescriptionMask property, so if you do want to include any calculated information here, you'll need to do the calculations yourself. On the flip side, this can let you put information in the group-by rows that the GroupByDescriptionMask can't calculate for you.
Can someone provide an example of how to replace the cell text in InitializeGroupByRow event handler?
Just set the e.Row.Description property. Learned it myself.
David Smith said:Just set the e.Row.Description property. Learned it myself.
That's all there is to it. :)