void gcMultiRow1_CellClick(object sender, CellEventArgs e)
{
if (e.CellName == "ColumnHeaderCell1" && e.Scope == CellScope.ColumnHeader)
{
ColumnHeaderCell columnheaderCell = gcMultiRow1.ColumnHeaders[0][e.CellName] as ColumnHeaderCell;
BindingSource bindingSource = this.gcMultiRow1.DataSource as BindingSource;
if (columnheaderCell.SortGlyphDirection == SortOrder.None || columnheaderCell.SortGlyphDirection == SortOrder.Descending)
{
bindingSource.Sort = "scores ASC";
}
else
{
bindingSource.Sort = "scores DESC";
}
}
}
Private Sub gcMultiRow1_CellClick(ByVal sender As Object, ByVal e As CellEventArgs) Handles gcMultiRow1.CellClick
If e.CellName = "ColumnHeaderCell1" AndAlso e.Scope = CellScope.ColumnHeader Then
Dim columnheaderCell As ColumnHeaderCell = TryCast(gcMultiRow1.ColumnHeaders(0)(e.CellName), ColumnHeaderCell)
Dim bindingSource As BindingSource = TryCast(Me.gcMultiRow1.DataSource, BindingSource)
If columnheaderCell.SortGlyphDirection = SortOrder.None OrElse columnheaderCell.SortGlyphDirection = SortOrder.Descending Then
bindingSource.Sort = "scores ASC"
Else
bindingSource.Sort = "scores DESC"
End If
End If
End Sub