Resets the Caption property to its previous value, or to a null reference (in Visual Basic Nothing).
[Visual Basic] Public Sub ResetCaption() [C#] public void ResetCaption(); [C++] public: void ResetCaption(); [JScript] public function ResetCaption();
The OnPropertyChanged event is raised when the method succeeds.
The following example checks the value of an argument, and invokes the ResetCaption method if nothing is found. Otherwise, it sets the column's caption to the argument value.
[Visual Basic]
Private Sub ColCaption(ByVal col As DataColumn, Optional newCap As String) If newCap = "" Then col.ResetCaption Else col.Caption = newCap End Sub
DataColumn Class | DataColumn Members | System.Data Namespace