here is what happens after i press a button:
dataGridView1.DataSource = ConnectandReadList(some_query);
dataGridView1.Refresh();
pl
Did you try calling EndEdit()
before Refresh()
?
Are you initializing the datasource the first time in an if(!Page.IsPostback)
It may be reseting the datasource on each postback.
You could do as @cycl suggested, you could also use a BindingSource which I believe is the recommended method by microsoft.
BindingSource bs = new BindingSource();
bs.DataSource = ConnectandReadList(some_query);
dataGridView1.DataSource = bs;
dataGridView1.Refresh;