gerardocrisci Posted May 9, 2016 Posted May 9, 2016 Hello everyone finally I'm using this library to a project. I ask you to have a component as TUniDBComboBox /TUniComboBox that besides having the property Items has properties by Values to display a label and set in the database a different value, Thank you <ul class="x-list-plain"> <li value="C">Coffee</li> <li value="T">Tea</li> <li value="M">Milk</li> <li value="W">Water</li> <li value="J">Juice</li> <li value="B">Beer</li> <ul> Quote
mika Posted May 9, 2016 Posted May 9, 2016 This feature is very much needed here too. It's frustrating to create memory table just to get lookup values for simplest things. Quote
gerardocrisci Posted May 10, 2016 Author Posted May 10, 2016 I created a component derived from UniDBComboBox if anyone has any improvements .. _UniDBComboBox.zip 2 Quote
gerardocrisci Posted May 31, 2016 Author Posted May 31, 2016 Fixed some minor bugs _UniDBComboBox.zip 2 Quote
rencarnacion Posted June 7, 2016 Posted June 7, 2016 Do you have any guide how to implement the component in Unigui ? Thanks Quote
gerardocrisci Posted June 7, 2016 Author Posted June 7, 2016 thanks for appreciating my variation Combo component .. If you find any error please let me know ... Quote
Servant5166 Posted December 11, 2017 Posted December 11, 2017 Do you have any guide how to implement the component in Unigui ? Thanks I need this too. Please leave instructions on how to install Quote
Daryl McMurray Posted February 12, 2018 Posted February 12, 2018 I discovered a small flaw in the component from @gerardocrisci... if you change the item in the list but cancel the edit (call TDataset.Cancel), the component does not refresh and revert back to the previous value as stored in the table. It will continue to show the new selected item from the list. You can fix this by inserting: if DataLink.Editing = false then begin InternalText := value+'1'; // gives reason to send change back to browser. end; before Text := Value; in the DataChange Method. I tried to attached a fixed version but the form won't let me... - Thank you so much @gerardocrisci for your original component and work. Quote
gerardocrisci Posted February 19, 2018 Author Posted February 19, 2018 I did not think anyone was using my component and so I did not publish the changes. you try this attached version _UniDBComboBox.zip 2 Quote
Daryl McMurray Posted February 20, 2018 Posted February 20, 2018 Thank you gerardocrisci - I just tried your updated component, but it still has the flaw I described in my post. If you use your combobox to change the dataset value, but then cancel the change (dataset.cancel) instead of post, the component should switch back to showing the original value that it started with to match the dataset. Yours does not do this. It will continue to show the newly selected value even though it does not now match what is in the dataset. If you make the change I suggested, or some variation of it, it will reset to the correct value as it should. There is a similar flaw that occurs when the component is connected to an empty dataset, a record is inserted or appended, and then then canceled. Like with the changed record, it keeps the new value instead of going blank like it should for an empty dataset. To fix that, add the following code AFTER the Text := Value; in the DataChange Method. if datalink.Field <> nil then begin if datalink.Field.IsNull then begin InternalText := '1'; text := ''; end; end; With those changes, I have made very good use of your component in several projects and I thank you again for your original work. Cheers! 2 Quote
phantomas70 Posted July 20, 2018 Posted July 20, 2018 Hi gerardocrisci I am trying to use this component as an inplace editor in dbgrid. Do you know how can I force the grid to display Items instead of values? What I mean is, let's say the value in the dataset is 'CHAR' but I want to display 'Alphanumeric' for every row that has this value. Can you help me? Quote
Sherzod Posted July 21, 2018 Posted July 21, 2018 Hello, Which edition and build are you using? Quote
M477H13U Posted August 27, 2018 Posted August 27, 2018 RegisterComponents('DINO UniGUI', [TxUniDBComboBox]); fail to properly register component.. do you have any idea why ? Quote
gesulmino Posted July 16, 2021 Posted July 16, 2021 On 7/21/2018 at 8:08 AM, Sherzod said: Hello, Which edition and build are you using? The component works fine, but why the procedure DoSetRemoteValue(AIndex:Integer; Value: string) is not called when the component is included in a hidden panel (within a dbgrid)? this causes it to fail... Quote
warmbooter Posted November 23, 2021 Posted November 23, 2021 All the links to download de component are not working anymore. Can anyone post a new working link? Quote
Sherzod Posted November 24, 2021 Posted November 24, 2021 5 hours ago, warmbooter said: All the links to download de component are not working anymore. Can anyone post a new working link? 1 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.