public Form2(string sqlstr,string tableName) : this()
{
this.tableName = tableName;
this.sqlstr = sqlstr;
Spreadinit(sqlstr);
}
private void Spreadinit(string sqlstr)
{
IDbContext db = DBHelper.Context();
DataTable dt = db.Sql(sqlstr).QuerySingle<DataTable>();
this.fpSpread1.DataSource = dt;
this.fpSpread1.ActiveSheet.AutoFilter = true;
}
我的代码如上,就是绑定了一个datatable,然后运行结果就是
直接是编辑状态
我没作其他设置,你看看如何解决? |