All pages
Powered by GitBook
1 of 2

Loading...

Loading...

ComboBox.ObjectCollection

Wisej.Web.ComboBox ObjectCollection

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.0.0.0)

Represents the collection of items in a Wisej.Web.ComboBox control.

public class ObjectCollection : IList, ICollection, IEnumerable
Public Class ObjectCollection
    Inherits IList
    Implements ICollection, IEnumerable

Properties

Count

: Returns the number of items in the collection.

IsReadOnly

: Returns a value indicating whether this collection can be modified.

Item(index)

: Retrieves the item at the specified index within the collection.

Throws:

  • The index was less than zero; or the index was greater of equal to the count of items in the collection.

Methods

Add(item)

Adds an item to the list of items for a .

Parameter
Type
Description

Returns: . The zero-based index of the item in the collection.

Throws:

  • The item parameter was null.

AddRange(items)

Adds a collection of items to the list.

Parameter
Type
Description

Clear()

Removes all items from the .

Contains(value)

Determines if the specified item is located within the collection.

Parameter
Type
Description

Returns: . true if the item is located within the collection; otherwise, false.

Throws:

  • value is null.

CopyTo(destination, index)

Copies the entire collection into an existing array of objects at a specified location within the array.

Parameter
Type
Description

GetEnumerator()

Returns an enumerator that can be used to iterate through the item collection.

Returns: . A that represents the item collection.

GetRealIndex(index)

Returns the real index in the collection accounting for the deleted items that have not been committed to the client yet.

Parameter
Type
Description

Returns: .

IndexOf(value)

Retrieves the index within the collection of the specified item.

Parameter
Type
Description

Returns: . The zero-based index where the item is located within the collection; otherwise, -1.

Throws:

  • The value parameter was null.

Insert(index, item)

Inserts an item into the collection at the specified index.

Parameter
Type
Description

Throws:

  • The item was null.

  • The index was less than zero; or the index was greater than the count of items in the collection.

OnCollectionChanged(action, element)

Fires the event.

Parameter
Type
Description

Remove(value)

Removes the specified item from the .

Parameter
Type
Description

RemoveAt(index)

Removes an item from the at the specified index.

Parameter
Type
Description

Throws:

  • The index parameter was less than zero, or the index parameter was greater than or equal to the count of items in the collection.

Events

CollectionChanged

Fired when the collection changes.

item

Object

An object representing the item to add to the collection.

items

Object[]

Collection of items to add to the list.

value

Object

An object representing the item to locate in the collection.

destination

Object[]

The object array to copy the collection to.

index

Int32

The location in the destination array to copy the collection to.

index

Int32

value

Object

An object representing the item to locate in the collection.

index

Int32

The zero-based index location where the item is inserted.

item

Object

An object representing the item to insert.

action

CollectionChangeAction

One of CollectionChangeAction indicating the reason the collection has changed.

element

Object

The element that was added or removed from the collection, or null.

value

Object

The Object to remove from the list.

index

Int32

The index of the item to remove.

Int32
Boolean
Object
ArgumentOutOfRangeException
ComboBox
Int32
ArgumentNullException
ComboBox
Boolean
ArgumentNullException
IEnumerator
IEnumerator
Int32
Int32
ArgumentNullException
ArgumentNullException
ArgumentOutOfRangeException
CollectionChanged
ComboBox
ComboBox
ArgumentOutOfRangeException
CollectionChangeEventHandler

ComboBox

Wisej.Web.ComboBox

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.0.0.0)

  • Control

    • ListControl

Represents a combo box control.

Constructors

ComboBox()

Initializes an instance of ComboBox.

ComboBox(onSelectedIndexChanged)

Initializes a new instance of class with specific initial settings.

Name
Type
Description

ComboBox(label, onSelectedIndexChanged)

Initializes a new instance of class with specific initial settings.

Name
Type
Description

ComboBox(dataSource, displayMember, valueMember, iconMember, onSelectedIndexChanged)

Initializes a new instance of class with specific initial settings.

Name
Type
Description

ComboBox(location, size, onSelectedIndexChanged)

Initializes an instance of with the given datasource, size, location, and action.

Name
Type
Description

ComboBox(location, size, dataSource, displayMember, valueMember, iconMember, onSelectedIndexChanged)

Initializes an instance of with the given datasource, size, location, and action.

Name
Type
Description

ComboBox(label, location, size, onSelectedIndexChanged)

Initializes an instance of with the given datasource, size, location, and action.

Name
Type
Description

ComboBox(label, location, size, dataSource, displayMember, valueMember, iconMember, onSelectedIndexChanged)

Initializes an instance of with the given datasource, size, location, and action.

Name
Type
Description

Properties

AllowHtml

: Returns or sets a value indicating that the control can display html in the Text property. (Default: False)

AutoCompleteMode

: Returns or sets how automatic completion works for the . (Default: None)

AutoSize

: Returns or sets whether the height of the control is set automatically. (Default: True)

CharacterCasing

: Returns or sets whether the control modifies the case of characters as they are typed. (Default: Normal)

DefaultSize

: Returns the default size for the ComboBox control.

DropDownHeight

: Returns or sets the maximum height in pixels of the drop-down portion of the . (Default: 400)

Throws:

  • The specified value is less than one.

DropDownStyle

: Returns or sets the drop down style of the combo box. (Default: DropDown)

DropDownWidth

: Returns or sets the maximum width in pixels of the drop-down list of the . When the value is 0, the drop-down list will grow to fit the largest item. (Default: 0)

Throws:

  • The specified value is less than one.

DroppedDown

: Returns or sets whether the combo box is displaying its drop-down portion.

EnableNativeContextMenu

: Enables or disables the browser's context menu. (Default: True)

IncrementalSelection

: Returns or sets whether items are selected incrementally as the user types within a timeout of 1 second. (Default: True)

ItemHeight

: Gets or sets the height of the list items in the drop-down list. When the value is -1, uses the value set in the theme. (Default: -1)

Throws:

  • The assigned value is less than -1; or the assigned value is greater than 500.

Items

: Returns the collection of the items contained in this .

Label

: Provides a label related to the control.

LabelText

: Returns or sets the localizable label associated with this control. (Default: "")

LazyLoading

: Returns or sets whether the items are sent to the client the first time the list is opened and enables the event. (Default: False)

MaxLength

: Returns or sets the number of characters a user can type into the . (Default: 0)

Throws:

  • The value is less than 0.

ReadOnly

: Returns or sets whether the control is read-only. (Default: False)

SelectedIndex

: Returns or sets the index of the currently selected item.

Throws:

  • The specified index is less than -1; o the specified index is greater than the number of items in the combo box.

SelectedItem

: Returns or sets currently selected item in the .

SelectedText

: Returns or sets the text that is selected in the editable portion of a .

SelectionLength

: Returns or sets the number of characters selected in the editable portion of the combo box.

Throws:

  • The value was less than zero.

SelectionStart

: Returns or sets the starting index of text selected in the combo box.

Throws:

  • The value is less than zero.

Sorted

: Returns or sets whether the items in the combo box are sorted. (Default: False)

Throws:

  • An attempt was made to sort a that is attached to a data source.

SpellCheck

: Returns or sets whether the text in the is spell checked by the browser. (Default: False)

Text

: Returns or sets the text associated with this control. (Default: "")

Tools

: Returns the instance of associated with this control.

Watermark

: Returns or sets the text to show when the control is empty. (Default: null)

Methods

BeginUpdate()

Not used. Kept for compatibility.

Copy()

Copies the current selection in the text box to the Clipboard.

CreateItemCollection()

Creates a new instance of the item collection.

Returns: . A that represents the new item collection.

Cut()

Moves the current selection in the text box to the Clipboard.

Dispose(disposing)

Disposes the control.

Parameter
Type
Description

EndUpdate()

Not used. Kept for compatibility.

FindString(text)

Returns the index of the first item in the that starts with the specified string.

Parameter
Type
Description

Returns: . The zero-based index of the first item found; returns -1 if no match is found.

FindString(text, startIndex)

Returns the index of the first item in the beyond the specified index that starts with the specified string. The search is not case sensitive.

Parameter
Type
Description

Returns: . The zero-based index of the first item found; returns -1 if no match is found, or 0 if the text parameter specifies .

FindStringExact(text)

Finds the first item in the combo box that matches the specified string.

Parameter
Type
Description

Returns: . The zero-based index of the first item found; returns -1 if no match is found, or 0 if the text parameter specifies .

FindStringExact(text, startIndex)

Finds the first item after the specified index that matches the specified string.

Parameter
Type
Description

Returns: . The zero-based index of the first item found; returns -1 if no match is found, or 0 if the text parameter specifies .

OnAutoComplete(e)

Fires the event.

Parameter
Type
Description

OnDataSourceChanged(e)

Fires the event.

Parameter
Type
Description

OnDisplayMemberChanged(e)

Fires the event.

Parameter
Type
Description

OnDropDown(e)

Fires the event.

Parameter
Type
Description

OnDropDownClosed(e)

Fires the event.

Parameter
Type
Description

OnDropDownStyleChanged(e)

Fires the event.

Parameter
Type
Description

OnLoad(e)

Fires the event.

Parameter
Type
Description

OnReadOnlyChanged(e)

Fires the event.

Parameter
Type
Description

OnSelectedIndexChanged(e)

Fires the event.

Parameter
Type
Description

OnSelectedItemChanged(e)

Fires the event.

Parameter
Type
Description

OnSelectionChangeCommitted(e)

Fires the event.

Parameter
Type
Description

OnSortedChanged(e)

Fires the event.

Parameter
Type
Description

OnToolClick(e)

Fires the ToolClick event.

Parameter
Type
Description

OnValidating(e)

Fires the event.

Parameter
Type
Description

OnValueMemberChanged(e)

Fires the event.

Parameter
Type
Description

OnWebEvent(e)

Processes the event from the client.

Parameter
Type
Description

OnWebRender(config)

Renders the client component.

Parameter
Type
Description

OnWebUpdate(state)

Updates the client component using the state information.

Parameter
Type
Description

Paste()

Replaces the current selection in the text box with the contents of the Clipboard.

RefreshItem(index)

Refreshes the item contained at the specified location.

Parameter
Type
Description

RefreshItems()

Reloads all the items from the data source.

Select(start, length)

Selects a range of text in the editable portion of the .

Parameter
Type
Description

SelectAll()

Selects all the text in the editable portion of the .

SetBoundsCore(x, y, width, height, specified)

Sets the specified bounds of the control.

Parameter
Type
Description

SetItemCore(index, value)

Sets the object with the specified index in the derived class.

Parameter
Type
Description

SetItemsCore(value)

Sets the specified array of objects in a collection in the derived class.

Parameter
Type
Description

Sort()

Sorts the items in the .

Events

AutoComplete

Fired before the event when is set to or .

The application may implement a different way to select the item when the user types a text and the ComboBox is validated. Set e.Handled to true to override the standard behavior.

DropDown

Fired when the drop-down portion of a is shown.

DropDownClosed

Fired when the drop-down portion of the is no longer visible.

DropDownStyleChanged

Fired when the property has changed.

Load

Fired when the drop-down list is first opened and the property is true.

When is true An application may fill the items at any time prior to the drop-down list being opened, or while processing the or event.

ReadOnlyChanged

Fired when the value of the property has changed.

SelectedIndexChanged

Fired when the property has changed.

SelectedItemChanged

Fired when the property has changed.

SelectionChangeCommitted

Fired when the selected item has changed and that change is displayed in the .

SortedChanged

Fired when the property has changed.

ToolClick

Fired when a is clicked.

Inherited By

Name
Description

Implements

Name
Description

onSelectedIndexChanged

Optional handler.

valueMember

Initial .

iconMember

Initial .

onSelectedIndexChanged

Optional handler.

displayMember

Initial .

valueMember

Initial .

iconMember

Initial .

onSelectedIndexChanged

Optional handler.

specified

A combination of the values.

Provides access to the validation events and properties property for controls that support validation.

All wisej components implement this interface.

All wisej controls derived from the class must implement this interface.

Allows an object to serialize itself.

onSelectedIndexChanged

Action<Object, EventArgs>

SelectedIndexChanged handler.

label

String

The initial text to display in the TextBox label.

onSelectedIndexChanged

Action<Object, EventArgs>

SelectedIndexChanged handler.

dataSource

Object

Initial DataSource.

displayMember

String

Initial DisplayMember.

valueMember

String

Initial ValueMember.

iconMember

String

location

Point

Initial location.

size

Size

Initial size.

onSelectedIndexChanged

Action<Object, EventArgs>

Optional SelectedIndexChanged handler.

location

Point

Initial location.

size

Size

Initial size.

dataSource

Object

Initial DataSource.

displayMember

String

label

String

The initial text to display in the TextBox label.

location

Point

Initial location.

size

Size

Initial size.

onSelectedIndexChanged

Action<Object, EventArgs>

label

String

The initial text to display in the TextBox label.

location

Point

Initial location.

size

Size

Initial size.

dataSource

Object

disposing

Boolean

true when this method is called by the application rather than a finalizer.

text

String

The String to search for.

text

String

The String to search for.

startIndex

Int32

The zero-based index of the item before the first item to be searched. Set to -1 to search from the beginning of the control.

text

String

The String to search for.

text

String

The String to search for.

startIndex

Int32

The zero-based index of the item before the first item to be searched. Set to -1 to search from the beginning of the control.

e

HandledEventArgs

A HandledEventArgs that contains the event data.

e

EventArgs

A EventArgs that contains the event data.

e

EventArgs

A EventArgs that contains the event data.

e

EventArgs

A EventArgs that contains the event data.

e

EventArgs

A EventArgs that contains the event data.

e

EventArgs

A EventArgs that contains the event data.

e

EventArgs

A EventArgs that contains the event data.

e

EventArgs

An EventArgs that contains the event data.

e

EventArgs

A EventArgs that contains the event data.

e

EventArgs

A EventArgs that contains the event data.

e

EventArgs

A EventArgs that contains the event data.

e

EventArgs

A EventArgs that contains the event data.

e

ToolClickEventArgs

A ToolClickEventArgs that contains the event data.

e

CancelEventArgs

A EventArgs that contains the event data.

e

EventArgs

A EventArgs that contains the event data.

e

WisejEventArgs

Event arguments.

config

Object

Dynamic configuration object.

state

Object

Dynamic state object.

index

Int32

The location of the item to refresh.

start

Int32

The position of the first character in the current text selection within the text box.

length

Int32

The number of characters to select.

x

Int32

The new Left property value of the control.

y

Int32

The new Top property value of the control.

width

Int32

The new Width property value of the control.

height

Int32

Not used.

index

Int32

The array index of the object.

value

Object

The object.

value

IList

An array of items.

DataGridViewComboBoxEditingControl

Represents a ComboBox control that can be hosted in a DataGridViewComboBoxCell.

ListViewComboBox

The TreeViewComboBox control represents a UserComboBox control with a ListView as the drop down panel.

TreeViewComboBox

The TreeViewComboBox control represents a UserComboBox control with a TreeView as the drop down panel.

UserComboBox

The UserComboBox control represents a ComboBox control with a custom panel that drops down when the user clicks the down arrow.

IUserData

Provides access to the UserData and Tag properties associated to the component implementing this interface.

IBindableComponent

Bindable components implement this interface.

IDropTarget

Controls that support drag & drop operations implement this interface.

ILabel

Provides access to the LabelWrapper associated with the controls that implement this interface.

IReadOnly

Provides access to the ReadOnly property for coontrols that support the read-only mode.

IModified

Provides access to the Modified property and ModifiedChanged event for controls that implement this interface.

ComboBox
Public Class ComboBox
    Inherits ListControl
    Implements ILabel, IReadOnly
ComboBox
ComboBox
ComboBox
ComboBox
ComboBox
ComboBox
ComboBox
Boolean
AutoCompleteMode
ComboBox
Boolean
CharacterCasing
ComboBox
Size
Int32
ComboBox
ArgumentException
ComboBoxStyle
Int32
ComboBox
ArgumentException
Boolean
Boolean
Boolean
Int32
ArgumentOutOfRangeException
ObjectCollection
ComboBox
LabelWrapper
String
Boolean
Load
Int32
ComboBox
ArgumentOutOfRangeException
Boolean
Int32
ArgumentOutOfRangeException
Object
ComboBox
String
ComboBox
Int32
ArgumentException
Int32
ArgumentException
Boolean
ArgumentException
ComboBox
Boolean
ComboBox
String
ComponentToolCollection
ComponentToolCollection
String
ObjectCollection
ObjectCollection
ComboBox
Int32
ComboBox
Int32
Empty
Int32
Empty
Int32
Empty
AutoComplete
DataSourceChanged
DisplayMemberChanged
DropDown
DropDownClosed
DropDownStyleChanged
Load
ReadOnlyChanged
SelectedIndexChanged
SelectedItemChanged
SelectionChangeCommitted
SortedChanged
Validating
ValueMemberChanged
ComboBox
ComboBox
ComboBox
ComboBox
ComboBox
HandledEventHandler
Validating
DropDownStyle
DropDown
Simple
EventHandler
ComboBox
EventHandler
ComboBox
EventHandler
DropDownStyle
EventHandler
LazyLoading
LazyLoading
DropDown
Load
EventHandler
ReadOnly
EventHandler
SelectedIndex
EventHandler
SelectedItem
EventHandler
ComboBox
EventHandler
Sorted
ToolClickEventHandler
ComponentTool
public class ComboBox : ListControl, ILabel, IReadOnly

Initial .

Initial .

Optional handler.

Initial .



this.comboBox1.AutoComplete += (s, e) =>
{
  if (this.comboBox1.Text == "T")
  {
    this.compoBox1.SelectedIndex = 1;
    e.Handled = true;
  }
}

IconMember
Action<Object, EventArgs>
SelectedIndexChanged
DisplayMember
String
ValueMember
String
IconMember
Action<Object, EventArgs>
SelectedIndexChanged
SelectedIndexChanged
DataSource
String
DisplayMember
String
ValueMember
String
IconMember
Action<Object, EventArgs>
SelectedIndexChanged
BoundsSpecified
BoundsSpecified
IValidation
IWisejComponent
IWisejControl
Control
IWisejSerializable