Cell Value Changing Event ,c#

前端 未结 3 1822
陌清茗
陌清茗 2021-01-21 22:48

I have a DataGridView in which there are 3 columns; Quantity, Rate and Amount.
The DataGridView is Editable. When I enter a value in the Rate Column then immediately the val

3条回答
  •  终归单人心
    2021-01-21 23:11

    If you really want to update the value without changing cells (as in on the fly), you'll have to handle the DataGridView.KeyPress event and check for which cell is being updated.

    If that's too much of a hassle, use the DataGridView.CellValueChanged event. It's simpler to implement than the KeyPress event.

提交回复
热议问题