2
我目前正在c#中開發一個應用程序,我需要讀取C#中DataGridView中每一行的單元格的值。在c中datagridview的每一行讀取單元格#
foreach (DataGridViewRow row in tblCategories.Rows)
{
string folderPath = tblBackups.Rows[row].Cells[5].Value.ToString();
string backupIncludes = tblBackups.Rows[row].Cells[4].Value.ToString();
Console.WriteLine("Folder Path: " + folderPath);
Console.WriteLine("Backup Includes: " + backupIncludes);
}
由於某種原因,這是行不通的。幫助與此將不勝感激。謝謝
這就是我寫的......似乎離你都拿到了行,然後從集合 – hunter 2010-11-24 21:04:45