I'm want to send more than one mail from selected cells in dataGridView, but don't know how to find out which cells are selected, so the question is how to find out which cells are selected?
Can I make some loop to iterate through cells and test which cell are selected (checked)?
Language c#.
Use the DataGridView.SelectedCells property.
foreach(DataGridViewCell cell in dataGridView.SelectedCells)
{
//do something
}
DataGridViewSelectedCellCollection selectedCells = myDataGridView.SelectedCells;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.