【问题标题】:How to set focus on updated row after updating row in DataGridView?更新 DataGridView 中的行后如何将焦点设置在更新的行上?
【发布时间】:2012-09-04 07:08:00
【问题描述】:

DataGridView 更新行后,如何设置更新行的焦点?

我想在更新行后将焦点设置在更新的行上,然后显示 datagrridview

DataGridView.CurrentCell = DataGridView.Rows(RowIndex)...

【问题讨论】:

    标签: vb.net


    【解决方案1】:

    使用

        'update en refresh your datagrid like so.
        myDataGrid.Update()
        myDataGrid.Refresh()
    
        'fill in the correct rowindex and column index and this will select/focus the 
        'correct row.
        myDataGrid.Select(rowIndex, ColumnIndex)
    

    【讨论】:

      猜你喜欢
      • 2013-11-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-02-24
      相关资源
      最近更新 更多