Answer the question
In order to leave comments, you need to log in
How to bind array of strings to DataGridView (WinForms) using DataSource, DataPropertyName properties?
private void Form1_Load(object sender, EventArgs e)
{
dataGridView1.Columns.Add(new DataGridViewTextBoxColumn() { DataPropertyName = "{}" });
dataGridView1.DataSource = new [] { "One", "Two", "Three", "Four" };
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question