Back to Devexpress

Table.Validate() Method

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-table-421e651f.md

latest1.7 KB
Original Source

Table.Validate() Method

Checks whether the current table instance is valid and usable.

Namespace : DevExpress.XtraRichEdit.API.Native

Assembly : DevExpress.RichEdit.v25.2.Core.dll

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
void Validate()
vb
Sub Validate

Remarks

The Validate method throws an exception if the current table is marked as deleted and is therefore unusable.

A Table object in a collection obtained using the SubDocument.Tables property is always valid and usable. However, a reference to the table can be is stored in a variable like this:

csharp
Table tbl = RichEditControl.Document.Tables[0];

Subsequently, at some point the table may be deleted and the reference becomes invalid. Even when a table is restored with Undo, the table is re-created as a new object and the former reference becomes unusable. When this happens, the Validate method will throw an exception.

See Also

Table Interface

Table Members

DevExpress.XtraRichEdit.API.Native Namespace