Jump to content

DBGrid with DBLookupcombo with keyfield<>listfield


alesf76

Recommended Posts

  • 2 months later...
  • 1 year later...
30 minutes ago, david_navigator said:

Did you ever solve this problem ?

Hello,

Do you mean this?

gridMode.png.8f8fbb0e7253241c22283edb8b0fee4c.png

\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

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.

UniGUI.png

Link to comment
Share on other sites

  • 8 months later...
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

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

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.

image.png.37f7fcf6e52eb1b26c5a8a4b600701c3.png

Here's a mock-up of what I was expecting to see

1. In edit more

image.png.a959917255313b3fb8869485f8f684a7.png


2. Not in edit mode

image.png.5763ad87fda7b38fcf9bb2a662aa4f56.png

 

Link to comment
Share on other sites

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

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.

  • Upvote 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...