DataGrid.UnSelect(Int32) 方法   
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
取消指定行的选定。
public:
 void UnSelect(int row);public void UnSelect (int row);member this.UnSelect : int -> unitPublic Sub UnSelect (row As Integer)参数
- row
- Int32
要撤消选择的行的索引。
示例
下面的代码示例演示了此成员的使用。
   // 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
注解
将此方法与特定行的选择IsSelectedSelect状态一起使用,以及ResetSelection用于操作特定行的选择状态的方法。