ListObject::ErrorAddDataBoundRow Event
Occurs when a user tries to add a row to a data-bound ListObject control, but the row cannot be added.
Assembly: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
This event is raised only if the ListObject control is bound to data.
Handle this event to attempt to correct possible errors.
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 version is for a document-level customization.
This version is for an application-level add-in. To use this code example, add the using System.Data; directive if you are using C# or the Imports System.Data statement if you are using Visual Basic.