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...
阅读全文
摘要:构造DbDataReader时带上“CommandBehavior.CloseConnection”参数,则关闭时会自动关闭连接:dbCommand.ExecuteReader(CommandBehavior.CloseConnection);否则在关闭DbDataReader时,一定要记得同时关闭相关的DbConnection
阅读全文

浙公网安备 33010602011771号