Partager via


ListObject Interface

Definition

The ListObject control displays data in a series of rows and columns.

public interface class ListObject : IDisposable, System::ComponentModel::IComponent, System::ComponentModel::ISupportInitialize, System::Windows::Forms::IBindableComponent
[System.Runtime.InteropServices.Guid("48eb309a-698d-4d40-95af-d9d083e63d30")]
public interface ListObject : IDisposable, System.ComponentModel.IComponent, System.ComponentModel.ISupportInitialize, System.Windows.Forms.IBindableComponent
[<System.Runtime.InteropServices.Guid("48eb309a-698d-4d40-95af-d9d083e63d30")>]
type ListObject = interface
    interface IBindableComponent
    interface IComponent
    interface IDisposable
    interface ISupportInitialize
Public Interface ListObject
Implements IBindableComponent, IComponent, IDisposable, ISupportInitialize
Attributes
Implements

Remarks

For more information, see ListObject Control.

Note

This interface is implemented by the Visual Studio Tools for Office runtime. It is not intended to be implemented in your code. For more information, see Visual Studio Tools for Office Runtime Overview.

Usage

This documentation describes the version of this type that is used in Office projects that target the .NET Framework 4 or later. In projects that target the .NET Framework 3.5, this type might have different members and the code examples provided for this type might not work. For documentation about this type in projects that target the .NET Framework 3.5, see the following reference section in the Visual Studio 2008 documentation: http://go.microsoft.com/fwlink/?LinkId=160658.

Properties

Active

Gets a value that indicates whether a ListObject control on a worksheet is active; that is, whether the active cell is inside the range of the ListObject control.

AlternativeText

Gets or sets the descriptive (alternative) text string for the specified table.

Application

Gets an Application that represents either the Microsoft Office Excel application or the creator of the ListObject.

AutoFilter

Gets a filtered table.

AutoSelectRows

Gets or sets a value that indicates whether the entire row is selected when the SelectedIndex changes.

AutoSetDataBoundColumnHeaders

Gets or sets a value that determines whether the column headers are automatically set to match the data source.

Comment

Gets or sets a comment that is associated with the ListObject.

Container
Creator

Gets the application in which the ListObject was created.

DataBodyRange

Gets a Range that represents the range that contains the data area in the list between the header row and the insert row.

DataBoundFormat

Gets or sets the format style for data-bound ListObject controls.

DataBoundFormatSettings

Gets or sets which FormatSettings of the specified XlRangeAutoFormat are applied to the ListObject control.

DataMember

Gets or sets the specific data member in a multimember data source to bind to the ListObject control.

DataSource

Gets or sets the source that contains a list of values that are used to populate the items within the control.

DefaultDataSourceUpdateMode

Gets or sets the default DataSourceUpdateMode.

DisplayName

Gets or sets the displayed name.

DisplayRightToLeft

Gets a value that indicates whether the ListObject is displayed from right to left instead of from left to right.

HeaderRowRange

Gets a Range that represents the range of the header row.

InnerObject

Gets a ListObject that represents the underlying native object for the ListObject.

InsertRowRange

Gets a Range that represents the Insert row, if any, of the ListObject control.

IsBinding

Gets a value that indicates whether data binding is active.

IsSelected

Gets a value that indicates whether the ListObject is selected.

ListColumns

Gets a ListColumns collection that represents all the columns in the ListObject control.

ListRows

Gets a ListRows object that represents all the rows of data in the ListObject control.

MappedColumns
Name

Gets or sets the name of the ListObject control.

Parent

Gets the parent object of the ListObject control.

QueryTable

Gets the QueryTable that provides a link for the ListObject control to the list server.

Range

Gets a Range that represents the range to which the ListObject applies.

SaveSortOrder

Gets or sets a value that indicates whether the row order of the ListObject control is saved in the worksheet.

SelectedIndex

Gets or sets the index of the row that is currently selected.

SharePointURL

Gets the URL of the SharePoint list for a given ListObject control.

ShowAutoFilter

Gets or sets a value that indicates whether the AutoFilter is displayed.

ShowHeaders

Gets or sets a value that indicates whether the header information should be displayed.

ShowTableStyleColumnStripes

Gets or sets a value that indicates whether the Column Stripes table style is used.

ShowTableStyleFirstColumn

Gets or sets a value that indicates whether the first column is formatted.

ShowTableStyleLastColumn

Gets or sets a value that indicates whether the last column is formatted.

ShowTableStyleRowStripes

Gets or sets a value that indicates whether the Row Stripes table style is used.

ShowTotals

Gets or sets a value that indicates whether the Total row is visible.

Sort

Gets the sort column or columns, and the sort order for the ListObject collection.

SourceType

Gets the current source of the list.

Summary

Gets or sets the description associated with the alternative text string for the specified table.

TableStyle

Gets or sets the table style.

Tag

Gets or sets the object that contains data about the Tag control.

TotalsRowRange

Gets a Range that represents the Total row of the ListObject control.

XmlMap

Gets an XmlMap that represents the schema map used for the list.

Methods

Delete()

Deletes a dynamically created ListObject control, clears the cell data from the worksheet, and removes the control from the ControlCollection.

Disconnect()

Removes data binding from the ListObject control.

ExportToVisio()

Exports a ListObject to Visio.

Publish(Object, Boolean)

Publishes the ListObject control to a server that is running Microsoft Windows SharePoint Services.

Refresh()

Updates the ListObject control with current data and schema from a server that is running Microsoft Windows SharePoint Services.

RefreshDataRow(Int32)

Updates the ListObject data row that is associated with the specified data row.

RefreshDataRows()

Updates all of the rows in the ListObject with data from the data source.

ResetPersistedBindingInformation()

Clears information about changes made to the ListObject control by the user.

Resize(Range)

Enables a ListObject control to be resized over a new range.

SetDataBinding(Object)

Binds a ListObject control to a data source.

SetDataBinding(Object, String)

Binds a ListObject control to a specified data member of a data source.

SetDataBinding(Object, String, String[])

Binds a ListObject control to a specified data member of a data source, and shows only specified columns of that data member.

Unlink()

Removes the link to a Microsoft Windows SharePoint Services site from a ListObject control.

Unlist()

Removes the list functionality from a ListObject control.

Events

BeforeAddDataBoundRow

Occurs just before an attempt to add a new row to a ListObject control that is bound to data.

BeforeDoubleClick

Occurs when the ListObject control is double-clicked, before the default double-click action.

BeforeRightClick

Occurs when the ListObject control is right-clicked, before the default right-click action.

BindingContextChanged
Change

Occurs when something changes in the ListObject control.

DataBindingFailure

Occurs when a condition causes the data binding of a ListObject control to fail.

DataMemberChanged

Occurs when the value of the DataMember property changes.

DataSourceChanged

Occurs when the value of the DataSource property changes.

Deselected

Occurs when selection moves from the ListObject control to outside of the ListObject control.

ErrorAddDataBoundRow

Occurs when a user tries to add a row to a data-bound ListObject control, but the row cannot be added.

OriginalDataRestored

Occurs when a user performs an action that is not allowed, and the ListObject control then reverts back to its original state.

Selected

Occurs when the ListObject control is selected.

SelectedIndexChanged

Occurs when the value of the SelectedIndex property changes.

SelectionChange

Occurs when the selection changes inside the ListObject control.

Applies to