DataGridView - Focus a specific cell

后端 未结 10 1453
陌清茗
陌清茗 2020-12-03 00:54

How to set focus on any specified cell in DataGridView? I was expecting a simple way like Focus(rowindex,columnindex) but it is not that easy.

10条回答
  •  囚心锁ツ
    2020-12-03 01:26

    Just Simple Paste And Pass Gridcolor() any where You want.

    Private Sub Gridcolor()
        With Me.GridListAll
            .SelectionMode = DataGridViewSelectionMode.FullRowSelect
            .MultiSelect = False
            '.DefaultCellStyle.SelectionBackColor = Color.MediumOrchid
        End With
    End Sub
    

提交回复
热议问题