using System;
using System.Data;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form511 : Form
{
public Form511()
{
InitializeComponent();
}
private BindingSource bs = new BindingSource();
private void Form511_Load(object sender, EventArgs e)
{
DataTable dt = new DataTable();
dt.Columns.Add("A", typeof (string));
dt.Columns.Add("B", typeof (string));
dt.Columns.Add("C", typeof (int));
dt.Columns.Add("D", typeof (string));
dt.Columns.Add("E", typeof (string));
dt.Rows.Add("1", "2", 3, "4", "5");
dt.Rows.Add("2", "3", 4, "5", "1");
dt.Rows.Add("3", "4", 5, "1", "2");
dt.Rows.Add("4", "5", 1, "2", "3");
dt.Rows.Add("5", "1", 2, "3", "4");
bs.DataSource = dt;
bindingNavigator1.BindingSource = bs;
dataGridView1.DataSource = bs;
}
}
}

