Skip to content

Instantly share code, notes, and snippets.

@housemeow
Created September 19, 2014 04:47
Show Gist options
  • Save housemeow/a838a1e8fd6730e38300 to your computer and use it in GitHub Desktop.
Save housemeow/a838a1e8fd6730e38300 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace DataGridViewBindingList
{
public partial class Form1 : Form
{
BindingList<string> cars = new BindingList<string>();
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
dataGridView1.DataSource = cars;
}
private void button1_Click(object sender, EventArgs e)
{
cars.Add("hello");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment