Mark Lampad

Mark Lampad

  • 1.9k
  • 55
  • 273

rewrite Datagridview Code to Datagrid

Oct 28 2019 3:37 AM
How to rewrite this code for Datagrid?
 
int sw1 = 0;
ids = string.Empty;
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
if (dataGridView1[0, i].Value != null)
{
if (sw1 == 0)
{
sw1 = 1;
}
else
ids += ",";
ids += dataGridView1[0, i].Value.ToString();
}
}

Brought to you by:

Answers (2)