ErrorAddDataBoundRowEventArgs Interface

 

Provides information for the ErrorAddDataBoundRow event.

Namespace:   Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

[GuidAttribute("eca34a5d-a43c-4be4-a24a-49d49ae4519b")]
public interface class ErrorAddDataBoundRowEventArgs

NameDescription
System_CAPS_pubpropertyInnerException

Gets the Exception instance that caused the current exception.

System_CAPS_pubpropertyItem

Gets the new item that the ListObject attempted to add to the data source.

System_CAPS_pubpropertyRetry

Gets or sets a value indicating whether the ListObject should attempt to add the item again.

The ErrorAddDataBoundRow event is raised by the ListObject control if an exception occurs during an attempt to add a new row to the data source bound to the ListObject. The Item property can be used to get the new item that the ListObject tried to add. The InnerException property provides the exception that was thrown, and the Retry property can be used to indicate whether another attempt to add this row should be made.

The following code example creates a DataTable and a ListObject, and binds the ListObject to the DataTable. It then creates an ErrorAddDataBoundRow event handler. To test the event, manually add a new row to the ListObject and enter the last name "Chan" and a first name. The event handler displays a message.

This example is for a document-level customization.

No code example is currently available or this language may not be supported.
Return to top
Show: