I have custom descendant of DataGridViewComboBoxColumn with the following value of Items
property set in design mode:
ItemA ItemB ItemC
During the runtime, I'm changing this Items
property like this (example):
for (int i = 0; i < Items.Count; i++) {
Items(i) = Convert.ToString(Items(i)) + " CHANGED";
}
After I close the form and return to the design mode, I can see property value set to
ItemA CHANGED ItemB CHANGED ItemC CHANGED
I wouldn't believe this is possible but this is what I'm getting. After 5 launches, I can see each item suffixed with CHANGED CHANGED CHANGED CHANGED CHANGED
.
I'm changing the items only once, in method called from Paint
event handler of descendant of DataGridViewComboBoxCell. (There was no better place to hook it, because in constructor, initialization is not finished yet so Items.Count = 0
).