今天更新了更新3.3.1后,
发现使用Grid编辑后红色修改标示不消失,但是内容却是更新后
另外重新绑定Grid好像没有起到作用。但是3.3.0是没问题的。代码如下;
更新:
db.Exec_Trans(sql_log);
UserGrid_Edit.Bind(); //重新绑定
Alert.Show("数据保存成功!");
public void Bind()
{
try
{
DB db = new DB();
DataView dv;
dv = db.Drv_table(SqlStringTmp + " order by " + String.Format("{0} {1}", SortColumn, SortDirection));
// 1.设置总项数(特别注意:数据库分页一定要设置总记录数RecordCount)
Grid1.RecordCount = dv.Count; //GetTotalCount(dv);
// 2.获取当前分页数据
DataTable table = GetPagedDataTable(dv,Grid1.PageIndex,Grid1.PageSize);
Grid1.DataSource = table;
Grid1.DataBind();
}
catch (Exception ex) { Alert.ShowInTop(ex.ToString() + "<br>" + SqlStringTmp + " order by " + String.Format("{0} {1}", SortColumn, SortDirection), "Grid数据绑定出错_Bind()", MessageBoxIcon.Error); }
}
|