why doesn't datagridview refresh?

前端 未结 9 2402
-上瘾入骨i
-上瘾入骨i 2021-01-02 18:19

here is what happens after i press a button:

    dataGridView1.DataSource = ConnectandReadList(some_query);
    dataGridView1.Refresh();

pl

9条回答
  •  Happy的楠姐
    2021-01-02 18:51

    Are you initializing the datasource the first time in an if(!Page.IsPostback)

    It may be reseting the datasource on each postback.

提交回复
热议问题