質問編集履歴
1
_dicListに値をセットする処理はこちらになります。
test
CHANGED
File without changes
|
test
CHANGED
@@ -53,3 +53,51 @@
|
|
53
53
|
}
|
54
54
|
|
55
55
|
```
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
_dicListに値をセットする処理はこちらになります。
|
60
|
+
|
61
|
+
```C#
|
62
|
+
|
63
|
+
private void dataGridViewMain_CurrentCellDirtyStateChanged(object sender, EventArgs e) {
|
64
|
+
|
65
|
+
try {
|
66
|
+
|
67
|
+
if (this.dataGridViewMain.CurrentCellAddress.X == CHECKBOX_INDEX && this.dataGridViewMain.IsCurrentCellDirty) {
|
68
|
+
|
69
|
+
this.dataGridViewMain.CommitEdit(DataGridViewDataErrorContexts.Commit);
|
70
|
+
|
71
|
+
}
|
72
|
+
|
73
|
+
}
|
74
|
+
|
75
|
+
}
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
private void dataGridViewMain_CellValueChanged(object sender, DataGridViewCellEventArgs e) {
|
80
|
+
|
81
|
+
if (e.ColumnIndex == CHECKBOX_INDEX && e.RowIndex >= 0) {
|
82
|
+
|
83
|
+
string check = this.dataGridViewMain[CHECKBOX_INDEX, e.RowIndex].Value.ToString();
|
84
|
+
|
85
|
+
string key = this.dataGridViewMain[ID_INDEX, e.RowIndex].Value.ToString();
|
86
|
+
|
87
|
+
if (check == true.ToString()) {
|
88
|
+
|
89
|
+
this._dicList[key] = true;
|
90
|
+
|
91
|
+
}
|
92
|
+
|
93
|
+
else {
|
94
|
+
|
95
|
+
this._dicList[key] = false;
|
96
|
+
|
97
|
+
}
|
98
|
+
|
99
|
+
}
|
100
|
+
|
101
|
+
}
|
102
|
+
|
103
|
+
```
|