ComboBoxCell CreateCommonComboBoxCell()
{
ComboBoxCell comboBoxCell = new ComboBoxCell();
// The item which listed in drop down window.
comboBoxCell.Items.AddRange("Item2", "Item1", "Item3", "Item4", "Long Item to Make Ellipsis Show");
// Sort items.
comboBoxCell.Sorted = true;
// Drop down window's width, in default, the value is equals to cell's width.
comboBoxCell.DropDownWidth = 100;
// In non edit status, if text's length bigger than cell's width, EllipsisString will be shown.
comboBoxCell.Ellipsis = MultiRowEllipsisMode.EllipsisEnd;
return comboBoxCell;
}
Private Function CreateCommonComboBoxCell() As ComboBoxCell
Dim comboBoxCell As New ComboBoxCell()
' The item which listed in drop down window.
comboBoxCell.Items.AddRange("Item2", "Item1", "Item3", "Item4", "Long Item to Make Ellipsis Show")
' Sort items.
comboBoxCell.Sorted = True
' Drop down window's width, in default, the value is equals to cell's width.
comboBoxCell.DropDownWidth = 100
' In non edit status, if text's length bigger than cell's width, EllipsisString will be shown.
comboBoxCell.Ellipsis = MultiRowEllipsisMode.EllipsisEnd
Return comboBoxCell
End Function