日期:2014-05-17 浏览次数:20443 次
SqlConnection cn = new SqlConnection(ConfigurationManager.ConnectionStrings["pubsConnectionString"].ConnectionString);
string selectsql = "select * from t_user";
SqlCommand cmd = new SqlCommand(selectsql, cn);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds, "t_user");
this.ASPxGridView1.DataSource = ds.Tables["t_user"].DefaultView;
this.ASPxGridView1.DataBind();
this.ASPxGridView1.DataSource = ds.Tables["t_user"];
this.ASPxGridView1.DataBind();