Jump to content

Bind TuniDBLookupCombobox to DBGrid column


Jean-Marc Kiener

Recommended Posts

Hi folks,

 

i have a dbgrid with a column which the DataField behind holding a integer value. This integer value is a key to another table dataset. I set up a TuniDBLookupCombobox showing a string field in the dropdown and as Keyfield the integer value. Now i configured the column to show the LookupCombobox as the editor.  My problem:

The integer value is shown in de column, not the String field configured in the LookupCombobox.

 

Can anybody help me with this?

Link to comment
Share on other sites

  • 4 years later...

Eu também faço isso, associo uma tunicombobox sem itens, adiciono um botão na caixa de combinação e, em gatilhos de eventos, disparo a consulta genérica para uma forma separada de pesquisa, então terei uma coluna com a código na grade, e outra coluna com a descrição (somente leitura), em resumo eu não uso tunidbloockupcombobox na grade, eu sempre faço uma pesquisa em um formulário separado, espero que o Google tenha lidado com isso corretamente.

 

printA.png

 

 

 

printB.png

 

 

 

 

printC.png

Link to comment
Share on other sites

Eu também faço isso, associo uma tunicombobox sem itens, adiciono um botão na caixa de combinação e, em gatilhos de eventos, disparo a consulta genérica para uma forma separada de pesquisa, então terei uma coluna com a código na grade, e outra coluna com a descrição (somente leitura), em resumo eu não uso tunidbloockupcombobox na grade, eu sempre faço uma pesquisa em um formulário separado, espero que o Google tenha lidado com isso corretamente.

 

printA.png

 

 

 

printB.png

 

 

 

 

printC.png

Hello there Wilton_rad ! (:

 

I'm sorry but I does not speak portugese .. and google trad did not rightly translate that sentence .. could you explain what you did in english please ? :3

Link to comment
Share on other sites

I also use google translator, the maximum I can do and translate for it

 

The images speak for themselves


I also do this, I associate a tunicombobox with no items, I add a button in the combo box and, in event triggers, I fire the generic query for a separate form of search, so I'll have one column with the code in the grid, and another column with the description (read-only), in summary I do not use tunidbloockupcombobox in the grid, I always do a search on a separate form

Link to comment
Share on other sites

Yeah sure the image speak for themselves, but I prefered to be sure as you wrote a few lines I could not understand.

 

Anyhow thanks for sharing you approach but it is not what we are seeking !

We already implemented something like this in our project but in this case we just want to implement a "key value combobox"! (:

 

 

Does anyone have another approach for that matter ? :3

Link to comment
Share on other sites

  • 2 weeks later...

Up ?

 

Is it normal that uniDBLookupCombobox.gridMode does not have the same behavior in a grid and outside a grid ? :/

 

You can find a testCase below that compare behavior of such a component inside and outside a grid; both component are linked to same TField.

 

Indeed, the one outside the grid does show us the listValue (as configured) wherease the one inside the grid show us the KeyValue ..

 

Any idea ??

 

TestDBLookupCombobox.7z

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...