NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataGrid.Dispose

Disposes of the resources (other than memory) used by the DataGrid.

[Visual Basic]
Overrides Public Sub Dispose()
[C#]
public override void Dispose();
[C++]
public: override void Dispose();
[JScript]
public override function Dispose();

Remarks

Call Dispose when you are finished using the DataGrid. The Dispose method leaves the DataGrid in an unuseable state. After calling Dispose, you must release all references to the DataGrid so the memory it was occupying can be reclaimed by garbage collection.

Example [Visual Basic]

The following example uses the Dispose method to free resources.

[Visual Basic]

Private Sub DisposeGridResources(ByVal myGrid As DataGrid)
   myGrid.Dispose
   Set myGrid = Nothing
End Sub

See Also

DataGrid Class | DataGrid Members | System.WinForms Namespace