08 2012 档案

摘要:有时候我们在保存GridControl修改时,会出现最后一笔数据怎么也保存不了的情况。这时,很有可能是你在保存的时候,最后一行正处于编辑状态,数据没有写入数据源。解决方法:[VB.NET]Open in popup windowPublic Sub Save() If gridView.FocusedRowHandle <> GridControl.NewItemRowHandle Then gridView.CloseEditor() gridView.UpdateCurrentRow() End If SaveData()End Sub来自:h... 阅读全文
posted @ 2012-08-23 11:03 sweetjian 阅读(1257) 评论(0) 推荐(0)
摘要:构造DbDataReader时带上“CommandBehavior.CloseConnection”参数,则关闭时会自动关闭连接:dbCommand.ExecuteReader(CommandBehavior.CloseConnection);否则在关闭DbDataReader时,一定要记得同时关闭相关的DbConnection 阅读全文
posted @ 2012-08-19 13:55 sweetjian 阅读(409) 评论(0) 推荐(0)