1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

DataGridViewでCellの値をソース上で変更してもRowstateがModifiedにならない

Posted at

ソース上でCellの値を変更するとBeginEditが自動で開始されており、
Cellの値を変更した後にEndEditを実行することでRowstateに変更が反映される。(Modified)
(EndEditを実行しないとRowstateがunchangedで変更されておらず困った)

'セルの値を変更することで自動的にBeginEdit()が開始される
hoge.Rows(0).Cells("仕入先コード").Value = strShiiresakiCodeValue

hoge.Rows(0).Cells("仕入先名称").Value = strShiiresakiNameValue

'セルが変更されたことを明示的に知らせる(RowstateにModifiedをセット)
hoge.Rows(0).EndEdit()
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?