DataGrid.UnSelect(Int32) Método

Definição

Cancela a seleção de uma linha especificada.

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

Parâmetros

row
Int32

O índice da linha a ter a seleção cancelada.

Exemplos

O exemplo de código a seguir demonstra o uso desse membro.

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

Comentários

Use esse método com o IsSelectedmétodo e SelectResetSelection os métodos para manipular o estado de seleção de uma linha específica.

Aplica-se a