HeaderPane
Main
Hide
Share Link
Print

Columns Property, SftBox Class

Defines the columns of the list.

Class: SftBox
Namespace: Softelvdm.SftBoxNET
Assembly: Softelvdm.SftBoxNET

Syntax

public ColumnsClass Columns { get; }
Public ReadOnly Property Columns As ColumnsClass

Value

The list's columns; the same as ListClass.Columns.

Comments

Defines the columns of the list.

At design time, the property pages open from this property.

Examples

C# View entire sample code

            countries.Rows.Add(45, "Denmark", "Copenhagen");
            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;

VB.NET View entire sample code

        countries.Rows.Add(45, "Denmark", "Copenhagen")
        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

See Also SftBox Class | Classes | SftBox/NET 3.0