GrapeCity MultiRow Windows Forms Documentation
SortCellName Property
Example 


Gets or sets the name of the cell in the Row.
Syntax
<DefaultValueAttribute()>
<TypeConverterAttribute("GrapeCity.Win.MultiRow.Design.CellNameTypeConverter, GrapeCity.Win.MultiRow, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")>
<SRCategoryAttribute("Behavior")>
<SRDescriptionAttribute("Indicates the name of the cell in the Row.")>
<RefreshPropertiesAttribute(RefreshProperties.All)>
Public Property SortCellName As String
Dim instance As ColumnHeaderCell
Dim value As String
 
instance.SortCellName = value
 
value = instance.SortCellName
[DefaultValue()]
[TypeConverter("GrapeCity.Win.MultiRow.Design.CellNameTypeConverter, GrapeCity.Win.MultiRow, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")]
[SRCategory("Behavior")]
[SRDescription("Indicates the name of the cell in the Row.")]
[RefreshProperties(RefreshProperties.All)]
public string SortCellName {get; set;}

Property Value

A System.String value that represents the name of the sort cell. The default is String.Empty.
Remarks
You can specify the sort cell using this property.
Example
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
Requirements

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

See Also

Reference

ColumnHeaderCell Class
ColumnHeaderCell Members
SortMode Property
SortCellIndex Property
SortGlyphDirection Property

 

 


Copyright © GrapeCity, inc. All rights reserved.