Skip to main content
Version: 3.5

ListViewItem

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.5.0.0)

Represents an item in a ListView control.

public class ListViewItem : ICloneable, IDisposable, IHasPropertyStore, IImage

Constructors

Instance memberListViewItem()

Initializes a new instance of the ListViewItem class with default values.

Instance memberListViewItem(text)

Initializes a new instance of the ListViewItem class with the specified item text.

NameTypeDescription
textStringThe text to display for the item.

Instance memberListViewItem(items)

Initializes a new instance of the ListViewItem class with an array of strings representing sub-items.

NameTypeDescription
itemsString[]An array of strings that represent the sub-items of the new item.

Instance memberListViewItem(text, imageIndex)

Initializes a new instance of the ListViewItem class with the specified item text and the image index position of the item's icon.

NameTypeDescription
textStringThe text to display for the item.
imageIndexInt32The zero-based index of the image within the ImageList associated with the ListView that contains the item.

Instance memberListViewItem(items, imageIndex)

Initializes a new instance of the ListViewItem class with the image index position of the item's icon and an array of strings representing sub-items.

NameTypeDescription
itemsString[]An array of strings that represent the sub-items of the new item.
imageIndexInt32The zero-based index of the image within the ImageList associated with the ListView that contains the item.

Instance memberListViewItem(items, imageIndex, foreColor, backColor, font)

Initializes a new instance of the ListViewItem class with the image index position of the item's icon; the foreground color, background color, and font of the item; and an array of strings representing sub-items.

NameTypeDescription
itemsString[]An array of strings that represent the sub-items of the new item.
imageIndexInt32The zero-based index of the image within the ImageList associated with the ListView that contains the item.
foreColorColorA Color that represents the foreground color of the item.
backColorColorA Color that represents the background color of the item.
fontFontA Font that represents the font to display the item's text in.

Instance memberListViewItem(subItems, imageIndex)

Initializes a new instance of the ListViewItem class with the image index position of the item's icon and an array of ListViewSubItem objects.

NameTypeDescription
subItemsListViewSubItem[]An array of type ListViewSubItem that represents the sub-items of the item.
imageIndexInt32The zero-based index of the image within the ImageList associated with the ListView that contains the item.

Instance memberListViewItem(text, imageKey)

Initializes a new instance of the ListViewItem class with the specified text and image.

NameTypeDescription
textStringThe text to display for the item. This should not exceed 259 characters.
imageKeyStringThe name of the image within the ImageList of the owning ListView to display in the ListViewItem.

Instance memberListViewItem(items, imageKey)

Initializes a new instance of the ListViewItem class with the specified item and sub-item text and image.

NameTypeDescription
itemsString[]An array containing the text of the sub-items of the ListViewItem.
imageKeyStringThe name of the image within the ImageList of the owning ListView to display in the ListViewItem.

Instance memberListViewItem(items, imageKey, foreColor, backColor, font)

Initializes a new instance of the ListViewItem class with the sub-items containing the specified text, image, colors, and font.

NameTypeDescription
itemsString[]An array of strings that represent the text of the sub-items for the ListViewItem.
imageKeyStringThe name of the image within the ImageList of the owning ListView to display in the item.
foreColorColorA Color that represents the foreground color of the item.
backColorColorA Color that represents the background color of the item.
fontFontA Font to apply to the item text.

Instance memberListViewItem(subItems, imageKey)

Initializes a new instance of the ListViewItem class with the specified sub-items and image.

NameTypeDescription
subItemsListViewSubItem[]An array of ListViewSubItem objects.
imageKeyStringThe name of the image within the ImageList of the owning ListView to display in the ListViewItem.

Properties

Instance memberAllowHtml

Boolean: Returns or sets a value indicating that the item can display HTML text. (Default: False)

When AllowHtml is set to true, the text in the item can contain HTML content. If the text contains new lines (CRLF) but doesn't contain HTML elements (at least one "<") all CRLF are automatically substituted with "<br/>".

Instance memberBackColor

Color: Returns or sets the background color of the ListView.

Instance memberChecked

Boolean: Returns or sets whether the item is checked. (Default: False)

Instance memberColSpan

Int32: Returns or sets the number of columns that this item can use to render its content when the ListView is in Details mode. (Default: 1)

Throws:

Instance memberContextMenu

ContextMenu: Returns or sets the shortcut menu associated with the item. (Default: null)

Instance memberControl

Control: Returns or sets a child control to display inside the item.

Instance memberDataBoundItem

Object: Returns the data-bound object for this ListViewItem.

Instance memberFocused

Boolean: Return or sets whether the item has the focus within the ListView parent.

Instance memberFont

Font: Returns or sets the font of the text displayed by the ListView.

Instance memberForeColor

Color: Returns or sets the foreground color of the ListView.

Instance memberHasUserData

Boolean: Checks if the UserData dynamic object was created and has any value.

Instance memberImage

Image: Returns or sets the image that is displayed on a ListViewItem.

Instance memberImageIndex

Int32: Returns or sets the image list index value of the image displayed in the ListViewItem. (Default: -1)

Throws:

Instance memberImageKey

String: Returns or sets the key accessor for the image in the ImageList. (Default: "")

Instance memberImageList

ImageList: Returns the ImageList that contains the images displayed in the ListViewItem.

Instance memberImageSource

String: Returns or sets the theme name or URL for the image to display in the ListViewItem.

Instance memberIndex

Int32: Returns the zero-based index of the item within the ListView control.

Instance memberIsDataBound

Boolean: Returns whether the ListViewItem is data bound.

Instance memberIsEditing

Boolean: Returns a value indicating whether the tree node is in an editable state.

Instance memberListView

ListView: Returns the ListView control that contains the item.

Instance memberName

String: Returns or sets the name associated with this item.

Instance memberRowHeight

Int32: Returns or sets the height of the row corresponding to this item when in Details view.

Instance memberRowSpan

Int32: Returns or sets the number of rows that this item can use to render its content when the ListView is in Details mode. (Default: 1)

Throws:

Instance memberSelected

Boolean: Returns or sets whether the item is selected.

Instance memberStateImageIndex

Int32: Returns or sets the image list index value of the state icon displayed in the ListViewItem. (Default: -1)

Throws:

Instance memberStateImageKey

String: Returns or sets the key for the state icon displayed in the ImageList. (Default: "")

Instance memberStateImageList

ImageList: Returns the ImageList that contains the state images displayed in the ListViewItem.

Instance memberStateImageSource

String: Returns or sets the theme name or URL for the state icon to display in the ListViewItem.

Instance memberSubItems

ListViewSubItemCollection: Returns a collection containing all sub items.

Instance memberTag

Object: Returns or sets an object that contains data to associate with the item. (Default: null)

Instance memberText

String: Returns or sets the text of the item. (Default: "")

Instance memberToolTipText

String: Returns or sets the text shown when the mouse pointer rests on the ListViewItem. (Default: "")

Instance memberUserData

Object: Returns a dynamic object that can be used to store custom data in relation to this item.

Instance memberVisible

Boolean: Returns or sets whether the item is visible.

Methods

Instance memberBeginEdit()

Places the item in edit mode.

Throws:

Instance memberClone()

Creates an identical copy of the item.

Returns: Object. An object that represents an item that has the same text, image, and sub-items associated with it as the cloned item.

Instance memberDispose()

Releases all resources used by the ListViewItem.

Instance memberEnsureVisible()

Ensures that the item is visible within the control, scrolling the contents of the control, if necessary.

Instance memberRemove()

Removes the item from its associated ListView control.

Implements

NameDescription
IImageProvides access to common image properties across the controls that implement this interface.