private void dgvFileAttachments_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 0) { AttachmentsUsingFilePaths.RemoveAt(e.RowIndex); this.refreshAttachemntListUsingFilePaths(); } }
private void btnAddAttachment_Click(object sender, EventArgs e) { openFileDialogForAttachments.InitialDirectory = ""; openFileDialogForAttachments.Reset(); openFileDialogForAttachments.Title = "Select Email Attachments Using File Paths"; openFileDialogForAttachments.ShowDialog(); foreach (string file in openFileDialogForAttachments.FileNames) { AttachmentsUsingFilePaths.Add(file); } this.refreshTheAttachmentList(); }