Guest Posted February 18, 2011 Posted February 18, 2011 Message from: "zilav" Hi Farshad! I have used EhLib components before, and they have a simple and brilliant TDBComboBox control with dual lists: Items and KeyItems, to create lookup combos without need of additional dataset. Can you please implement the same functionality in UniGui? Frankly speaking, half of lookups or even more in most db apps are static, they never change, but to make them work, we need 1 additional dataset, 1 datasource, 1 table in DB (if not using single global lookup table), and perform 1 extra query to fill it. It is already a mess to develop apps with a large number of lookups in traditional desktop VCL with all those extra db components in datamodules, assignments of listsources, keyfields and listfields, and a memory hog in runtime too. But in unigui, where all those datasets are created for each user session, it can become critical. And I'm not even speaking about startup time for each session spent creating lookups in datamodules. . 1 Quote
Guest Posted February 18, 2011 Author Posted February 18, 2011 Message from: "Farshad Mohajeri" "zilav" wrote in message news:PzYMytzzLHA.2720@anaxagvs227... > Hi Farshad! > > I have used EhLib components before, and they have a simple and brilliant > TDBComboBox control with dual lists: Items and KeyItems, to create lookup > combos without need of additional dataset. Can you please implement the > same functionality in UniGui? Frankly speaking, half of lookups or even > more in most db apps are static, they never change, but to make them work, > we need 1 additional dataset, 1 datasource, 1 table in DB (if not using > single global lookup table), and perform 1 extra query to fill it. It is > already a mess to develop apps with a large number of lookups in > traditional desktop VCL with all those extra db components in datamodules, > assignments of listsources, keyfields and listfields, and a memory hog in > runtime too. But in unigui, where all those datasets are created for each > user session, it can become critical. And I'm not even speaking about > startup time for each session spent creating lookups in datamodules. You mean dataset for lookup and target dataset are both same dataset? Say you have a dataset with field named "country". Are you going to fill the lookup Combo from this field and post changes also to same Field? What will happen if there are duplicate rows? . Quote
Guest Posted February 18, 2011 Author Posted February 18, 2011 Message from: "zilav" >You mean dataset for lookup and target dataset are both same dataset? I mean no dataset for lookup values, the keys are stored in KeyItems stringlist, Values are in Items stringlist. They both have the same size, dropdown list is shown using Items list, but real values are taken from KeyItems. Look here http://www.ehlib.com/EhLibUsersGuide/UsingEditControls.htm under "Using TDBComboBoxEh control". . Quote
Guest Posted February 20, 2011 Author Posted February 20, 2011 Message from: "Farshad Mohajeri" "zilav" wrote in message news:lI0nIg3zLHA.2720@anaxagvs227... > >You mean dataset for lookup and target dataset are both same dataset? > > I mean no dataset for lookup values, the keys are stored in KeyItems > stringlist, Values are in Items stringlist. They both have the same size, > dropdown list is shown using Items list, but real values are taken from > KeyItems. Look here > http://www.ehlib.com/EhLibUsersGuide/UsingEditControls.htm under "Using > TDBComboBoxEh control". > Ok. So adding KeyItems property to TBComboBox seems to be enough. Logged #849 . Quote
Guest Posted February 21, 2011 Author Posted February 21, 2011 Message from: "Junior/RO" zilav escreveu: > I have used EhLib components before, and they have a simple and brilliant TDBComboBox control with dual lists: Items and KeyItems, to create lookup combos without need of additional dataset. Can you please implement the same functionality in UniGui? +1 . 1 Quote
Phxtecno Posted June 26, 2015 Posted June 26, 2015 Message from: "zilav" Hi Farshad! I have used EhLib components before, and they have a simple and brilliant TDBComboBox control with dual lists: Items and KeyItems, to create lookup combos without need of additional dataset. Can you please implement the same functionality in UniGui? Frankly speaking, half of lookups or even more in most db apps are static, they never change, but to make them work, we need 1 additional dataset, 1 datasource, 1 table in DB (if not using single global lookup table), and perform 1 extra query to fill it. It is already a mess to develop apps with a large number of lookups in traditional desktop VCL with all those extra db components in datamodules, assignments of listsources, keyfields and listfields, and a memory hog in runtime too. But in unigui, where all those datasets are created for each user session, it can become critical. And I'm not even speaking about startup time for each session spent creating lookups in datamodules. . Was developed a component with this feature ? regards Quote
Ron Posted June 27, 2015 Posted June 27, 2015 Agree - and also quite often you need to be able to pick a value with its key, from a single control - without using a grid -and then a dbcombobox or dblistbox with a keyfield would do the trick. At the same time - if you make this, Farshad - why not also make a non-db version where you can store an integer value for each item, which could then take a key value. 1 Quote
mika Posted June 29, 2015 Posted June 29, 2015 +1. This would be very useful. Until now, I've been using memory table and dblookupcombobox to achieve this. Using just combobox with key/value pairs would be lot easier and also code would be more clean because in that case, there would be no need to initialize lookup memory table and other things. 2 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.