HeaderPane
Main
Hide
Share Link
Print

DataMember Property, ColumnClass Class

Defines the property of a data source row shown in this column's cells.

Class: ColumnClass
Namespace: Softelvdm.SftBoxNET
Assembly: Softelvdm.SftBoxNET

Syntax

public string DataMember { get; set; }
Public Property DataMember As String

Value

The name of the property (or data column), or an empty string.

The default value is String.Empty.

Comments

Defines the property of a data source row shown in this column's cells.

Only used while the control is bound to a data source (ListClass.DataSource property).

Examples

C# View entire sample code

            countries.Rows.Add(33, "France", "Paris");
            countries.Rows.Add(49, "Germany", "Berlin");
            countries.Rows.Add(39, "Italy", "Rome");
            countries.Rows.Add(81, "Japan", "Tokyo");
            countries.Rows.Add(52, "Mexico", "Mexico City");
            countries.Rows.Add(34, "Spain", "Madrid");

            sftBox6.Columns.Count = 2;
            sftBox6.Columns[0].DataMember = "Name";
            sftBox6.Columns[1].DataMember = "Capital";
            sftBox6.DropDownWidthMode = DropDownWidthModeEnum.Optimal;
            sftBox6.DisplayMember = "Name";
            sftBox6.ValueMember = "Id";
            sftBox6.DataSource = countries;

            order.CountryId = 81;

VB.NET View entire sample code

        countries.Rows.Add(33, "France", "Paris")
        countries.Rows.Add(49, "Germany", "Berlin")
        countries.Rows.Add(39, "Italy", "Rome")
        countries.Rows.Add(81, "Japan", "Tokyo")
        countries.Rows.Add(52, "Mexico", "Mexico City")
        countries.Rows.Add(34, "Spain", "Madrid")

        SftBox6.Columns.Count = 2
        SftBox6.Columns(0).DataMember = "Name"
        SftBox6.Columns(1).DataMember = "Capital"
        SftBox6.DropDownWidthMode = DropDownWidthModeEnum.Optimal
        SftBox6.DisplayMember = "Name"
        SftBox6.ValueMember = "Id"
        SftBox6.DataSource = countries

        order.CountryId = 81

See Also ColumnClass Class | Classes | SftBox/NET 3.0