Table of Contents

Class NoxGridComboBoxColumn

Namespace
Nox.Grid.WinForms
Assembly
Nox.Grid.WinForms.dll

Combo box column. Values are picked from a list when editing.

public class NoxGridComboBoxColumn : NoxGridColumn, IComponent, IDisposable
Inheritance
NoxGridComboBoxColumn
Implements
Inherited Members

Constructors

NoxGridComboBoxColumn()

Creates a combo box column.

public NoxGridComboBoxColumn()

NoxGridComboBoxColumn(string, string)

Creates a combo box column with a name and header text.

public NoxGridComboBoxColumn(string name, string headerText)

Parameters

name string
headerText string

Properties

CaretToEndOnSelect

After picking from the list, puts the caret at the end of the text so typing continues (LimitToList False).

public bool CaretToEndOnSelect { get; set; }

Property Value

bool

CommitOnSelect

Commits the value as soon as an item is picked (no need for Enter or leaving the cell). CellValueChanged fires immediately. Default: False.

public bool CommitOnSelect { get; set; }

Property Value

bool

DataSource

List of objects for the drop-down (DataTable, list of objects, …). Used instead of Items when set. DisplayMember is shown, ValueMember is stored in the cell.

public object DataSource { get; set; }

Property Value

object

DefaultSortMode

Combo box columns do not sort on a header click by default (same as DataGridView). Set SortMode = Automatic to sort.

protected override NoxGridColumnSortMode DefaultSortMode { get; }

Property Value

NoxGridColumnSortMode

DisplayMember

Property shown in the list and in the cell (empty: the item itself)

public string DisplayMember { get; set; }

Property Value

string

DropDownOnClick

Opens the list with a single click on the cell.

public bool DropDownOnClick { get; set; }

Property Value

bool

DropDownWidth

Width of the drop-down list (px at 96 DPI). 0: as wide as the widest item, at least the column.

public int DropDownWidth { get; set; }

Property Value

int

Items

The list items.

public NoxGridComboBoxItemCollection Items { get; }

Property Value

NoxGridComboBoxItemCollection

LimitToList

Allows only values from the list (False also allows typing other values). Default: True.

public bool LimitToList { get; set; }

Property Value

bool

ValueMember

Property stored in the cell (empty: the item itself)

public string ValueMember { get; set; }

Property Value

string

Methods

RefreshItems()

Re-reads DataSource and Items for the cell text (call after the list data changed).

public void RefreshItems()