/// <summary> /// Delete the selected attribute /// </summary> /// <param name="sender">The sender of the event</param> /// <param name="e">The event arguments</param> private void btnDelete_Click(object sender, EventArgs e) { int idx; if (dgvAttributes.SelectedRows.Count != 0) { idx = dgvAttributes.SelectedRows[0].Index; if (idx < attributes.Count) { dgvAttributes.EndEdit(); attributes.RemoveAt(idx); } } }
/// <summary> /// Delete the selected attribute /// </summary> /// <param name="sender">The sender of the event</param> /// <param name="e">The event arguments</param> private void btnDeleteAttribute_Click(object sender, EventArgs e) { int idx; if (dgvHelpAttributes.SelectedRows.Count != 0) { idx = dgvHelpAttributes.SelectedRows[0].Index; if (idx < attributes.Count) { dgvHelpAttributes.EndEdit(); attributes.RemoveAt(idx); this.IsDirty = attributesChanged = true; } } }