ListObject::ErrorAddDataBoundRow Event

 

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

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

event ErrorAddDataBoundRowEventHandler^ ErrorAddDataBoundRow {
	void add(ErrorAddDataBoundRowEventHandler^ value);
	void remove(ErrorAddDataBoundRowEventHandler^ value);
}

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.

No code example is currently available or this language may not be supported.

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.

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