Infragistics(R) NetAdvantage(R) Windows Forms
SortComparisonType Property
See Also  Example E-mail your feedback on this topic.
Infragistics.Win.UltraWinGrid Namespace > UltraGridColumn Class : SortComparisonType Property

Gets/sets the type of sorting which will be performed the column. Note, this setting can be set for all columns via the SortComparisonType property on the Override object.

Syntax

Visual Basic (Declaration) 
Public Property SortComparisonType As SortComparisonType
C# 
public SortComparisonType SortComparisonType {get; set;}

Example

This snippet demonstrates how to use the GroupByMode and SortComparisonType properties.

Visual BasicCopy Code
Private Sub SetupGrid()
   ' If the user groups by the Orders column then the groupings should be built like they are when
   ' a DateTime column is grouped in Microsoft Outlook 2003.
   '
   Me.ultraGrid1.DisplayLayout.Bands("Orders").Columns("DateReceived").GroupByMode = GroupByMode.OutlookDate
   
   ' If the user groups by the LastName column then the groupings should be based on only the first letter
   ' of the customer's last name.
   '
   Me.ultraGrid1.DisplayLayout.Bands("Customers").Columns("LastName").GroupByMode = GroupByMode.FirstCharacter
   
   ' The LastName column should not use case sensitive comparisons when sorting/grouping.
   '
   Me.ultraGrid1.DisplayLayout.Bands("Customers").Columns("LastName").SortComparisonType = SortComparisonType.CaseInsensitive
   
   ' The rest of the text columns should use case-sensitive sorts.  This is the default behavior.
   '
   Me.ultraGrid1.DisplayLayout.Override.SortComparisonType = SortComparisonType.CaseSensitive
End Sub
C#Copy Code
private void SetupGrid()
{
	// If the user groups by the Orders column then the groupings should be built like they are when
	// a DateTime column is grouped in Microsoft Outlook 2003.
	//
	this.ultraGrid1.DisplayLayout.Bands["Orders"].Columns["DateReceived"].GroupByMode = GroupByMode.OutlookDate;

	// If the user groups by the LastName column then the groupings should be based on only the first letter
	// of the customer's last name.
	//
	this.ultraGrid1.DisplayLayout.Bands["Customers"].Columns["LastName"].GroupByMode = GroupByMode.FirstCharacter;

	// The LastName column should not use case sensitive comparisons when sorting/grouping.
	//
	this.ultraGrid1.DisplayLayout.Bands["Customers"].Columns["LastName"].SortComparisonType = SortComparisonType.CaseInsensitive;

	// The rest of the text columns should use case-sensitive sorts.  This is the default behavior.
	//
	this.ultraGrid1.DisplayLayout.Override.SortComparisonType = SortComparisonType.CaseSensitive;
}

See Also