Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- C#: DataGridViewCheckBoxCell strange behaviour
- foreach (string pre in preselect)
- {
- foreach (DataGridViewRow row in dgvProtFunc.Rows)
- {
- if ((string)row.Cells[2].Value == pre)
- {
- ((DataGridViewCheckBoxCell)row.Cells[0]).Value = true;
- }
- }
- }
- private void dgvProtFunc_CurrentCellDirtyStateChanged(object sender, EventArgs e)
- {
- if (dgvProtFunc.IsCurrentCellDirty)
- {
- dgvProtFunc.CommitEdit(DataGridViewDataErrorContexts.Commit);
- }
- }
- private void dgvProtFunc_CellValueChanged(object sender, DataGridViewCellEventArgs e)
- {
- if (!FormLoadCheck)
- {
- string data = string.Empty;
- ptSelectList.Clear();
- foreach (DataGridViewRow row in dgvProtFunc.Rows)
- {
- if (row.Cells[0].Value != null && Convert.ToBoolean(row.Cells[0].Value) == true)
- {
- ptSelectList.Add(Convert.ToInt32(row.Cells[1].Value));
- }
- data += row.Cells[0].Value;
- }
- ptSelectList.Sort();
- FilterRelais(ptSelectList.ToArray());
- MessageBox.Show(data);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment