DataGridView -Value does not gets saved if selection is not lost from a cell

前端 未结 6 863
暖寄归人
暖寄归人 2020-12-16 03:53

I am using the DataGridView Control for reading and writing an XML file through XML Serialization.

I have an issue as explained below:

  1. I read an XML fi
6条回答
  •  爱一瞬间的悲伤
    2020-12-16 04:07

    The best way (though quick and dirty) is to assign the currentCell value to Nothing.

    For example, in the save method, do:

    dgvMyGrid.CurrentCell = Nothing
    

    and then proceed further.

提交回复
热议问题