Gets or sets the index of the cell in the
Row.
Property Value
A
System.Int32 value that represents the index of the sort cell. The default is -1.
The following code example shows how to make a column header cell perform a sort when clicking with the mouse. To run this example, create a GcMultiRow control in a form and copy the code into the Form.Load event handler.
private void Form1_Load(object sender, EventArgs e)
{
Template template1 = Template.CreateGridTemplate(4);
ColumnHeaderCell columnHeaderCell = template1.ColumnHeaders[0][0] as ColumnHeaderCell;
columnHeaderCell.SelectionMode = MultiRowSelectionMode.None;
columnHeaderCell.SortMode = SortMode.Automatic;
columnHeaderCell.SortCellName = "textBoxCell1";
gcMultiRow1.Template = template1;
}
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim template1 As Template = Template.CreateGridTemplate(4)
Dim columnHeaderCell As ColumnHeaderCell = TryCast(template1.ColumnHeaders(0)(0),
ColumnHeaderCell)
columnHeaderCell.SelectionMode = MultiRowSelectionMode.None
columnHeaderCell.SortMode = SortMode.Automatic
columnHeaderCell.SortCellName = "textBoxCell1"
gcMultiRow1.Template = template1
End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2