The grid has a default System.Collections.IComparer implementation that is used to compare cells and determine if their contents are equivalent. This implementation is used when merging, grouping, or searching for values (see the AllowMerging property and the C1.Win.C1FlexGrid.C1FlexGridBase.Subtotal(C1.Win.C1FlexGrid.AggregateEnum,System.Int32,System.Int32,System.Int32,System.Int32,System.String,C1.Win.C1FlexGrid.AggregateFlags,C1.Win.C1FlexGrid.RowColFlags) and FindRow(String,Int32,Int32,Boolean,Boolean,Boolean,Boolean) methods).
The default implementation is case-sensitive and takes leading and trailing blanks into account.
If you want to merge cells using a case-insensitive comparison or trimming blanks, write a custom class that implements the System.Collections.IComparer interface and assign an instance of it to the grid's CustomComparer property.
Setting this property to null (Nothing in Visual Basic) restores the default behavior.
// use case-insensitive comparer flex.CustomComparer = new CaseInsensitiveComparer(); // add groups ignoring case flex.Subtotal(AggregateEnum.Sum, 0, groupOn, totalOn); // restore default (case-sensitive) comparer flex.CustomComparer = null;