C# Dizi’den Datagridview’e Veri Doldurma


string[,] x = new string[(say-1)/2, 2]; //x dizisi tanımlıyoruz... (koddan evveli de var)....

int boy = x.GetLength(0);
int en = x.GetLength(1);

dataGridView1.ColumnCount = en;

for (int r = 0; r < boy; r++)
{
DataGridViewRow row = new DataGridViewRow();
row.CreateCells(dataGridView1);

for (int c = 0; c < en; c++)
{
row.Cells.Value = x[r, c];
}
dataGridView1.Rows.Add(row);
}

Paylaşmayı unutmayın!
0 0 votes
Article Rating
Subscribe
Bildir
guest
0 Yorum
Inline Feedbacks
View all comments