Sdílet prostřednictvím


DataGrid.UnSelect(Int32) Metoda

Definice

Zruší výběr zadaného řádku.

public:
 void UnSelect(int row);
public void UnSelect (int row);
member this.UnSelect : int -> unit
Public Sub UnSelect (row As Integer)

Parametry

row
Int32

Index řádku, který chcete zrušit,

Příklady

Následující příklad kódu ukazuje použití tohoto člena.

   // 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.
 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

Poznámky

Tuto metodu IsSelectedpoužijte s , Selecta ResetSelection metody k manipulaci se stavem výběru konkrétního řádku.

Platí pro