Я пишу цикл foreach для доступа к значениям всех ячеек в каждой строке datagridveiw, но у меня возникает ошибка
"DataGridRow ' не содержит определения для "Cells", и не удалось найти доступный метод расширения "Cells", принимающий первый аргумент типа "DataGridRow" (вам не хватает директивы using или ссылки на сборку?)".
foreach (DataGridRow row in dataGrid_users.Rows)
{
// Retrieve cell values from the row
string name = row.Cells["name"].Valu?.ToString();
string surname = row.Cells["surname"].Value?.ToString();
string goal = row.Cells["goal"].Value?.ToString();
string operation = row.Cells["operation"].Value?.ToString();
string description = row.Cells["discription"].Value?.ToString();
string job = row.Cells["job"].Value?.ToString();
string station = row.Cells["station"].Value?.ToString();
string date = row.Cells["date"].Value?.ToString();
}
Подробнее здесь: https://stackoverflow.com/questions/790 ... tagridview