delphi中dbgrideh中的checkbox列在点击后不能与数据库表中对应的boolen值同步,怎么办?

dragonman7806 2009-11-11 04:08:53
如题:
delphi中dbgrideh中的checkbox列在点击后不能与数据库表中对应的boolen值同步,怎么办?
具体为:在dbgrideh中点击一个,access数据库表中可能未打上钩,点击多个总有一个未打上钩,有什么解决方案么?我想在dbgrideh中根据打钩选择行作选中的导入导出行数据处理的
...全文
121 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
wsxcdx 2009-11-13
  • 打赏
  • 举报
回复
adoquery.post
dragonman7806 2009-11-12
  • 打赏
  • 举报
回复
好象没用哎
jing12 2009-11-11
  • 打赏
  • 举报
回复
最后一个尚未保存,做操作前,判断一下:
if dataset.state in [dsInsert, dsEdit] then
dataset.post;
DBGRIDEH 是Enlib 3.0组件包的组件之一。Enlib 3.0组件包是一位俄国人为增强Borland系开发工具功能而开发的第三方组件,它具有界面友好、功能强大、开发效率高、、快速制作预览/打印简单国式报表等特点。因此,一推出即受到广大Borland程序员的青睐。目前这个版本支持Borland Delphi versions 4,5,6&7 和 Borland C++ Builder versions 4 & 5 ,可极大地提高数据库应用系统客户端的性能。许多商品软件如《速达2000》等都使用了该组件。下面本人将使用该组件在实际系统开发过程的经验总结如下。 Enlib3.0组件包最重要而且功能最强大的莫过于dbgrideh组件,本文介绍的所有实例均在Delphi 7开发环境下调试通过。 一、DBGridEh(增强型表格组件)功能详解 DBGridEh组件无论在外观上还是功能上都非常类似Borland开发工具现有的dbgrid组件,它除了提供dbgrid组件的全部功能外,还增加了下新功能: ● 任意选择多行、或矩形区域的数据. ● 为多标题设定共同的父标题行. ● 表格底部(Footer) 区显示求和、计数和其它统计信息. ● 自动调整组件宽度与客户区域等宽. ● 设置标题行、数据行的高度. ● 超长的标题行、数据行文本自动折行处理. ● 标题行可作为按钮使用,并可选择是否显示排序标志符(▽降序△升序). ● 点击标题可对当前自动排序而无需编写代码. ● 能够自动设置删除超长文本显示不下的多余部分,并以省略号(…)代替. ● 自动搜索字段(Lookup)数据单元格以单、多字段下拉表形式显示. ● 自动搜索字段(Lookup)数据单元格可进行增量搜索. ● 可锁定任意数在屏幕水平方向不滚动. ● 日期时间控件DateTime picker 可支持TDateField and TDateTimeField两种日期格式. ● 根据字段不同显示关联的ImageList 对象图片组的图片. ● 隐藏任意. ● 显示3D风格的数据区、表尾区和锁定滚动,制作3D外观表格. ● 显示Memo类型字段. ● 除BOOLEAN型数据外,其它数据类型也可以检查框( checkbox )形式显示数据. ● 使用专门的函数和过程来存取以reg或ini文件格式保存的表格布局(包含各数据表、数据访问顺序、宽、索引标识、行高等信息)文件。 ● 通过设置数据单元格的hint和ToolTips属性,当移动鼠标到该单元格时,可以显示单元格容纳不下的文本内容. ● 将组件数据导入/导出到Text, Csv, HTML, RTF, XLS 和内部数据等多种格式的文件.
Ehlib 是著名的数据库连接控制,版本为5.2.84,DBgrid增强VCL控件;支持多表头,多固定,按表头排序,支持合计,并支持直接打印。可以和PB的ataWindow媲美。 本版本含完整源代码,支持以下 IDE: Delphi 5,6,7,2005 C++Builder 5,6 BDS 2006 (Delphi 2006, C++Builder 2006) Delphi 2007 RAD Studio 2009 (Delphi 2009, C++Builder 2009) Embarcadero RAD Studio 2010 (Delphi 2010, C++Builder 2010) 本人已在Delphi XE运行通过,在本人编制的进销存软件应用完全正常。 注:Delphi 2010、XE里面安装不要修改bpl文件的输出路径,采用默认,否则安装难以成功。 Version 5.2 + Added feature to group data in the DBGridEh. It is allowed to make grouping at run-time and design-time. Grouping works only when the grid is connected to TMemTableEh dataset. Use next subproperties of Grid.DataGrouping property to adjust grouping Active: Boolean - Set this propery true to active grouping. DefaultStateExpanded: Boolean - defines initial expapnding/collapsing state of new created elements of the grouping tree. GroupLevels: TGridDataGroupLevelsEh - Collection of group levels. Use this property to create template of the grouping. GroupPanelVisible: Boolean - Set this property to True to show special panel at the top part of the grid. Then the panel is thisible it is allowed to form group levels by mouse. Drag title of the requaried column to the group panel and drop it onto panel. Font: TFont - Controls the attributes of the default font of group records in the grid. Color: Tcolor - Default background color of the group records. See demonstration project of grouping in Demos\DataGrouping directory. Version 5.1 * The type of RowPanel property was changed. Instead of Boolean type, now it is an object property with subproperies: Active: Boolean - Defines if it is possible to place cells under each over and if every propetry can have personal hight. + NavKeysNavigationType: TGridRowPanelNavKeysNavigationTypeEh - defines the order of navigation over cells in the grid when keys Up, Down, Left, Right are pressed. rpntRowT

2,496

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧