alesf76 Posted September 21, 2018 Share Posted September 21, 2018 Is there any example of how to use a DBLookupcombo where the key field is differente from the list field ? I tried but after editing I see the key field value in the grid instead of the list field value. Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted September 21, 2018 Share Posted September 21, 2018 Please check "DBLookupComboBox - GridMode" Demo Link to comment Share on other sites More sharing options...
alesf76 Posted September 21, 2018 Author Share Posted September 21, 2018 But in this example keyfield is equal to listfield Link to comment Share on other sites More sharing options...
hph Posted December 4, 2018 Share Posted December 4, 2018 Any news about this? I have the same problem! Thanks Link to comment Share on other sites More sharing options...
david_navigator Posted July 21, 2020 Share Posted July 21, 2020 Did you ever solve this problem ? Link to comment Share on other sites More sharing options...
Sherzod Posted July 21, 2020 Share Posted July 21, 2020 30 minutes ago, david_navigator said: Did you ever solve this problem ? Hello, Do you mean this? \FMSoft\Framework\uniGUI\Demos\Desktop\DBLookupComboBox - GridMode BTW, can you please specify which edition and build of UniGUI are you using? Link to comment Share on other sites More sharing options...
david_navigator Posted July 21, 2020 Share Posted July 21, 2020 Hi No, I don't think so. I have a column in a dbGrid where the datafield is an Integer. When the row is being edited, then the editor (UniDBLookUpComboBox) is displayed and the List Value is displayed for that row (SaleofHire in screenshot) - which is what I want. However when the row isn't being edited, then the raw data is displayed (7 in screen shot). I was hoping that the UniDBLookUpComboBox List Value would be displayed whether in edit mode or not. I can easily work around the problem by creating a calculated field that does the lookup, but I want to check that there wasn't something built in first. Link to comment Share on other sites More sharing options...
david_navigator Posted April 4, 2021 Share Posted April 4, 2021 On 7/21/2020 at 5:47 PM, david_navigator said: Hi No, I don't think so. I have a column in a dbGrid where the datafield is an Integer. When the row is being edited, then the editor (UniDBLookUpComboBox) is displayed and the List Value is displayed for that row (SaleofHire in screenshot) - which is what I want. However when the row isn't being edited, then the raw data is displayed (7 in screen shot). I was hoping that the UniDBLookUpComboBox List Value would be displayed whether in edit mode or not. I can easily work around the problem by creating a calculated field that does the lookup, but I want to check that there wasn't something built in first. http://www.navigator-support.com/UniGUI.png Is this supposed to work ? It seems common for most other (non-unigui) grids, so seems weird that it doesn't work with UniGUI. Link to comment Share on other sites More sharing options...
Sherzod Posted April 4, 2021 Share Posted April 4, 2021 On 7/21/2020 at 9:47 PM, david_navigator said: I have a column in a dbGrid where the datafield is an Integer. When the row is being edited, then the editor (UniDBLookUpComboBox) is displayed and the List Value is displayed for that row (SaleofHire in screenshot) - which is what I want. However when the row isn't being edited, then the raw data is displayed (7 in screen shot). I was hoping that the UniDBLookUpComboBox List Value would be displayed whether in edit mode or not. I can easily work around the problem by creating a calculated field that does the lookup, but I want to check that there wasn't something built in first. http://www.navigator-support.com/UniGUI.png 5 minutes ago, david_navigator said: Is this supposed to work ? It seems common for most other (non-unigui) grids, so seems weird that it doesn't work with UniGUI. Hello, Can you please make a simple testcase to see the "issue"? Link to comment Share on other sites More sharing options...
david_navigator Posted April 4, 2021 Share Posted April 4, 2021 15 minutes ago, Sherzod said: Hello, Can you please make a simple testcase to see the "issue"? Sure. I'll do that shortly. Meanwhile here's a screen shot of what I see - the UniDBLookupCombo is displayed when the record is being edited, but not on the rows that are not being edited. Here's a mock-up of what I was expecting to see 1. In edit more 2. Not in edit mode Link to comment Share on other sites More sharing options...
david_navigator Posted April 4, 2021 Share Posted April 4, 2021 Here's a sample project. The Column "Fruit" should display the description of the Fruit all the time, not only when the cell is being edited. UnitGridTest.zip Link to comment Share on other sites More sharing options...
Sherzod Posted April 4, 2021 Share Posted April 4, 2021 30 minutes ago, david_navigator said: Here's a sample project. The Column "Fruit" should display the description of the Fruit all the time, not only when the cell is being edited. You must create a lookup field. Please see this demo: \FMSoft\Framework\uniGUI\Demos\Desktop\GridLookupField Link to comment Share on other sites More sharing options...
david_navigator Posted April 4, 2021 Share Posted April 4, 2021 16 minutes ago, Sherzod said: You must create a lookup field. Ah !! Now I understand. Easy when you know the answer I've been using DevExpress VCL controls for over 10 years and they don't require a lookup field, I guess they must create one behind the scenes, and so I'd forgotten all about the lookup field option. All now working. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now