private void btn_fetch_Click(object sender, EventArgs e) { string result = ""; string part1 = ""; string part2 = ""; for (int i = 1; i <= DGV_CsvFile.Rows.Count; i++) { part1 = DGV_CsvFile.Rows[i].Cells[0].Value.ToString(); part2 = DGV_CsvFile.Rows[i].Cells[1].Value.ToString(); result =result + part1+" : "+part2+"\n"; } }