hi i am working on datagridview i am showing the code but its not displaying in windows application so please let me know its urgent
thank you.
namespace datagridw
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
load();
}
private void load()
{
SqlConnection con = new SqlConnection("User id=sa; Password=123; Initial Catalog=bts; Data Source=fff");
SqlDataAdapter da = new SqlDataAdapter("select *from Login", con);
DataSet dr = new DataSet();
BindingSource bs = new BindingSource();
da.Fill(dr,"order");
SqlCommandBuilder bt = new SqlCommandBuilder(da);
bs.DataSource = ds.Tables["order"];
dataGridView1.DataSource = bs;
}
}
}
on window the data need to be displayed but its not .