//获取绑定行数据
DataModel dm = dgvDatas.CurrentRow.DataBoundItem as DataModel;
private void dgvDatas_CellClick(object sender, DataGridViewCellEventArgs e) { if(e.ColumnIndex==0) { DataModel dm = dgvDatas.CurrentRow.DataBoundItem as DataModel; dm.SelCheck = !dm.SelCheck; //(sender as DataGridView).UpdateCellValue(e.ColumnIndex, e.RowIndex); SetChk(); } }
标签:dm,绑定,DataGridView,CurrentRow,选中,DataModel,dgvDatas From: https://www.cnblogs.com/yuanshuo/p/17083101.html