Class ListViewControl
Represents a Windows list view control, which displays a collection of items that can be displayed using one of four different views.
Wraps the
Inherited Members
Namespace: FastReport.Dialog
Assembly: FastReport.dll
Syntax
public class ListViewControl : DialogControl, IDisposable, IFRSerializable, IHasEditor
Constructors
ListViewControl()
Initializes a new instance of the ListViewControl class with default settings.
Declaration
public ListViewControl()
Properties
CheckBoxes
Gets or sets a value indicating whether a check box appears next to each item in the control.
Wraps the
Declaration
public bool CheckBoxes { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
CheckedIndices
Gets the indexes of the currently checked items in the control.
Wraps the
Declaration
[Browsable(false)]
public ListView.CheckedIndexCollection CheckedIndices { get; }
Property Value
| Type | Description |
|---|---|
| ListView.CheckedIndexCollection |
CheckedItems
Gets the currently checked items in the control.
Wraps the
Declaration
[Browsable(false)]
public ListView.CheckedListViewItemCollection CheckedItems { get; }
Property Value
| Type | Description |
|---|---|
| ListView.CheckedListViewItemCollection |
Columns
Gets the collection of all column headers that appear in the control.
Wraps the
Declaration
[Browsable(false)]
public ListView.ColumnHeaderCollection Columns { get; }
Property Value
| Type | Description |
|---|---|
| ListView.ColumnHeaderCollection |
Groups
Gets the collection of ListViewGroup objects assigned to the control.
Wraps the
Declaration
[Browsable(false)]
public ListViewGroupCollection Groups { get; }
Property Value
| Type | Description |
|---|---|
| ListViewGroupCollection |
ItemCheckedEvent
Gets or sets a script method name that will be used to handle the ItemChecked event.
Declaration
public string ItemCheckedEvent { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Items
Gets a collection containing all items in the control.
Wraps the
Declaration
[Browsable(false)]
public ListView.ListViewItemCollection Items { get; }
Property Value
| Type | Description |
|---|---|
| ListView.ListViewItemCollection |
LargeImageList
Gets or sets the ImageList to use when displaying items as large icons in the control.
Wraps the
Declaration
[Browsable(false)]
public ImageList LargeImageList { get; set; }
Property Value
| Type | Description |
|---|---|
| ImageList |
ListView
Gets an internal ListView.
Declaration
[Browsable(false)]
public ListView ListView { get; }
Property Value
| Type | Description |
|---|---|
| ListView |
MultiSelect
Gets or sets a value indicating whether multiple items can be selected.
Wraps the
Declaration
public bool MultiSelect { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
SelectedIndexChangedEvent
Gets or sets a script method name that will be used to handle the SelectedIndexChanged event.
Declaration
public string SelectedIndexChangedEvent { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
SelectedIndices
Gets the indexes of the selected items in the control.
Wraps the
Declaration
[Browsable(false)]
public ListView.SelectedIndexCollection SelectedIndices { get; }
Property Value
| Type | Description |
|---|---|
| ListView.SelectedIndexCollection |
SelectedItems
Gets the items that are selected in the control.
Wraps the
Declaration
[Browsable(false)]
public ListView.SelectedListViewItemCollection SelectedItems { get; }
Property Value
| Type | Description |
|---|---|
| ListView.SelectedListViewItemCollection |
ShowGroups
Gets or sets a value indicating whether items are displayed in groups.
Wraps the
Declaration
public bool ShowGroups { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
SmallImageList
Gets or sets the ImageList to use when displaying items as small icons in the control.
Wraps the
Declaration
[Browsable(false)]
public ImageList SmallImageList { get; set; }
Property Value
| Type | Description |
|---|---|
| ImageList |
Text
This property is not relevant to this class.
Declaration
[Browsable(false)]
public override string Text { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Overrides
View
Gets or sets how items are displayed in the control.
Wraps the
Declaration
public View View { get; set; }
Property Value
| Type | Description |
|---|---|
| View |
Methods
AttachEvents()
Attaches Control events to its event handlers.
Declaration
protected override void AttachEvents()
Overrides
Remarks
Override this method if your custom control has own events.
DetachEvents()
Detaches Control events from its event handlers.
Declaration
protected override void DetachEvents()
Overrides
Remarks
Override this method if your custom control has own events. In this method, you should detach control's events that were attached in the AttachEvents() method.
OnItemChecked(ItemCheckedEventArgs)
This method fires the ItemChecked event and the script code connected to the ItemCheckedEvent.
Declaration
public virtual void OnItemChecked(ItemCheckedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| ItemCheckedEventArgs | e | Event data. |
OnSelectedIndexChanged(EventArgs)
This method fires the SelectedIndexChanged event and the script code connected to the SelectedIndexChangedEvent.
Declaration
public virtual void OnSelectedIndexChanged(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e | Event data. |
Serialize(FRWriter)
Serializes the object.
Declaration
public override void Serialize(FRWriter writer)
Parameters
| Type | Name | Description |
|---|---|---|
| FRWriter | writer | Writer object. |
Overrides
Remarks
Do not call this method directly. You should override it if you are developing a new component for FastReport.
This method is called when the object needs to save the state. It may happen when:
- saving the report to the file or stream;
- saving the report to the designer's undo buffer;
- assigning the object to another object using the Assign(Base) or AssignAll(Base) methods;
- saving the object to the designer's clipboard;
- saving the object to the preview (when run a report).
ShouldSerializeBackColor()
Determines whether is necessary to serialize the BackColor property.
Declaration
protected override bool ShouldSerializeBackColor()
Returns
| Type | Description |
|---|---|
| System.Boolean | true if serialization is necessary. |
Overrides
ShouldSerializeForeColor()
Determines whether is necessary to serialize the ForeColor property.
Declaration
protected override bool ShouldSerializeForeColor()
Returns
| Type | Description |
|---|---|
| System.Boolean | true if serialization is necessary. |
Overrides
Events
ItemChecked
Occurs when the checked state of an item changes.
Wraps the
Declaration
public event ItemCheckedEventHandler ItemChecked
Event Type
| Type | Description |
|---|---|
| ItemCheckedEventHandler |
SelectedIndexChanged
Occurs when the index of the selected item in the list view control changes.
Wraps the
Declaration
public event EventHandler SelectedIndexChanged
Event Type
| Type | Description |
|---|---|
| System.EventHandler |