Gridview 数据源不更新

Gridview DataSource doesn't update

按下按钮,我尝试使用来自 SQL 服务器的数据库和其他 table 更新我 ASP.net 网站上的 GridView,但它没有改变,没有 "catch".

GridView 没有出现。

    {
        SqlConnection sqlConnection1;
        sqlConnection1 = new SqlConnection(@"Data Source=ELAD_HA\SQLEXPRESS;Initial Catalog=Users;Integrated Security=True");
        SqlCommand sqlCommand1;
        sqlCommand1 = new SqlCommand("SELECT * FROM TBUsers ORDER BY Name", sqlConnection1);
        try
        {
            DataSet ds = new DataSet();
            SqlDataAdapter adptr = new SqlDataAdapter(sqlCommand1);
            SqlCommandBuilder comb = new SqlCommandBuilder(adptr);
            adptr.Fill(ds,"T1");

            GridView2.DataSource = ds.Tables["T1"];

            //GridView2.DataSource = ds;
            //GridView2.DataMember = "T1";
        }
        catch (SqlException ex)
        {
            SuccessLabel1.Text = ex.Message.ToString();
        }
    }

代码有什么问题?
P.S
我可以将数据源更改为从菜单中选择数据源的 GridView 吗? (来自 "split" 屏幕)。

感谢各位帮手

尝试调用数据绑定来更新内容:

GridView2.DataBind();

此致