Freigeben über


DataGrid.UnSelect-Methode

Hebt die Auswahl einer angegebenen Zeile auf.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

Syntax

'Declaration
Public Sub UnSelect ( _
    row As Integer _
)
'Usage
Dim instance As DataGrid
Dim row As Integer

instance.UnSelect(row)
public void UnSelect (
    int row
)
public:
void UnSelect (
    int row
)
public void UnSelect (
    int row
)
public function UnSelect (
    row : int
)

Parameter

  • row
    Der Index der Zeile, für die die Auswahl aufgehoben werden soll.

Beispiel

' On Click of Button "Unselect Row" this event is raised.
 Private Sub UnselectRow_Clicked(ByVal sender As Object, ByVal e As EventArgs)
     ' Unselect the current row from the Datagrid
     myDataGrid.UnSelect(myDataGrid.CurrentRowIndex)
 End Sub 'UnselectRow_Clicked
// On Click of Button "Unselect Row" this event is raised.
private void UnselectRow_Clicked(object sender, EventArgs e)
{
   // Unselect the current row from the Datagrid
   myDataGrid.UnSelect(myDataGrid.CurrentRowIndex);
}
   // On Click of Button "Unselect Row" this event is raised.
private:
   void UnselectRow_Clicked( Object^ /*sender*/, EventArgs^ /*e*/ )
   {
      // Unselect the current row from the Datagrid
      myDataGrid->UnSelect( myDataGrid->CurrentRowIndex );
   }
// On Click of Button "Unselect Row" this event is raised.
protected void UnselectRow_Clicked(Object sender, EventArgs e)
{
    // Unselect the current row from the Datagrid
    myDataGrid.UnSelect(myDataGrid.get_CurrentRowIndex());
} //UnselectRow_Clicked

Plattformen

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

.NET Compact Framework

Unterstützt in: 2.0, 1.0

Siehe auch

Referenz

DataGrid-Klasse
DataGrid-Member
System.Windows.Forms-Namespace