DELPHI盒子
!实时搜索: 盒子论坛 | 注册用户 | 修改信息 | 退出
检举帖 | 全文检索 | 关闭广告 | 捐赠
技术论坛
 用户名
 密  码
自动登陆(30天有效)
忘了密码
≡技术区≡
DELPHI技术
lazarus/fpc/Free Pascal
移动应用开发
Web应用开发
数据库专区
报表专区
网络通讯
开源项目
论坛精华贴
≡发布区≡
发布代码
发布控件
文档资料
经典工具
≡事务区≡
网站意见
盒子之家
招聘应聘
信息交换
论坛信息
最新加入: 19137911446
今日帖子: 13
在线用户: 18
导航: 论坛 -> DELPHI技术 斑竹:liumazi,sephil  
作者:
男 ganbing (干冰) ★☆☆☆☆ -
盒子活跃会员
2003/12/6 16:19:47
标题:
关于DBlookupcombobox的属性 浏览:1726
加入我的收藏
楼主: 谁给说说listfield,keyfield具体指什么,

用的时候有什么区别和联系

----------------------------------------------
尽情舒展,是一种向往,想去的地方、想拥有的感受,尽管追求!
作者:
男 bios (阿贡) ★☆☆☆☆ -
盒子中级会员
2003/12/7 15:01:54
1楼: 看BORLAND的帮助:

property ListField: String;

Description

The lookup control represents a field in one 
table by displaying the value of one or more 
corresponding fields in another table. ListField 
is the name of the field or fields in the lookup 
table that are actually displayed, as opposed to 
the DataField, which is the field in the DataSource
 that the lookup control actually represents, or the
 KeyField, which is the field in the lookup table 
with the same value as the DataField. 

To fully specify the list fields, both a dataset for the lookup table and the fields within that dataset must be defined. The ListSource property of the lookup control specifies the dataset for the lookup table.

ListField can represent more than one field. Multiple field names should be separated by semicolons. 

Before specifying ListField, specify the link between the two datasets using the KeyField property. If ListField is not set, lookup controls display KeyField field values by default. If the DataField field is a lookup field, don't specify anything for ListField; the data controls automatically use the lookup field's LookupResultField property as ListField.


property KeyField: String;

Description

Use KeyField to link the ListSource of the lookup control to the DataSource. Although the name of the field specified as the KeyField does not have to be the same as the name of the field specified as the DataField, the two fields must have the same values. 

After specifying the ListField, choose which field the lookup control will actually display with the ListField property.

If the DataField field is a lookup field, don't specify anything for KeyField or ListField; lookup controls automatically use the data field's LookupKeyFields property for KeyField.


----------------------------------------------
按此在新窗口浏览图片
按此在新窗口浏览图片
作者:
男 ganbing (干冰) ★☆☆☆☆ -
盒子活跃会员
2003/12/8 8:47:18
2楼: ListField is the name of the field or fields in the lookup table that are actually displayed

KeyField, which is the field in the lookup table with the same value as the DataField.

Use KeyField to link the ListSource of the lookup control to the DataSource. 

不习惯它的表达,不能理解确切的意思,请请指教啊

在这里,datasource 和datafield 是直接关联的一套吧,用在设定显示的那一栏中,
而listsource,listfield,keyfield是用于设定下拉栏的内容的,也许还怎么关联了一下datasource? 我的理解对么? 那他们到底如何关系?

晕了! 请指教!
----------------------------------------------
尽情舒展,是一种向往,想去的地方、想拥有的感受,尽管追求!
信息
登陆以后才能回复
Copyright © 2CCC.Com 盒子论坛 v3.0.1 版权所有 页面执行58.59375毫秒 RSS