开发者

DB Lookup field with Firemonkey and Delphi XE2

I can't find a way to bind a TCombobox with a lookup field in Firemonkey. In VCL you have a TDBLookupComboBox that just needs a TDatasource component and the lookup field name to populate the combobox list. In this way you can edit the FK field easly at runtime.

In Firemonkey all you have is Livebindings and I can't figure out how to set up the same behavior. The best i've done so far is to populate the combobox list with a TBindList and use a TBindDBListLink connected to the lookup f开发者_运维知识库ield. In this way it seems to work but the combobox doesn't let me change the selected item.

This is one of the most basic things that a database application should have but i don't get why there is no one talking about it yet.


You can download Delphi XE2 LiveBinding Demos from this SVN address:

https://radstudiodemos.svn.sourceforge.net/svnroot/radstudiodemos/branches/RadStudio_XE2/LiveBindings

Once you download it, you can find a demo project called bindlookup. It demonstrates how to have lookup lists using LiveBinding.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜