Forum > LCL

[SOLVED] Controlling the behavior - JVCLLaz - JvDBLookUpCombo?

(1/6) > >>

I've been using JvDBLookUpCombo from the JVCLLaz components for a few months. Haven't taken the time to post but I can figure out how to make the drop-down display more than one field properly.  Turning on AutoSize, RightTrimmedLookup, FieldDelimiter attempting to get the drop-down to display Contact Lastname, Firstname, Mi.  I can make it work if I change ListStyle to IsDelimited but IsFixed just displays the first field.  This works fine for States and Countries looking up a state abbrev. and the fullname of the state using IsFixed with the delimiter char#124 which is a vertical line char. Looks good. Also, if I use JvDBLookUpCombo for Firm Types, i.e. the Firm Type, Description.  The Description doesn't even show if I use IsFixed, I think it's a field length issue...

Basically what I'm inquiring here is to display the drop-down nice and neat in columns delimited with IsFixed and not IsDelimited. If the user wants to lookup a contact in the Clients form, the JVDbLoopDropDown just desplays the contact last name if I set the ListStyle to IsFixed.  If I set it to IsDelimited, works but the delimiter between LName, FName & Mi are delimited with commas, not ASCII char. #124. Now, for states or countries, the dropdown is delimited IsFixed with #124 which shows the state abbrev. | state name. Maybe it's a width issue????

I don't have those controls installed; however, does it have an optional OwnerDraw event?

if so, you can paint the data to the cells as you wish.


--- Quote from: 1HuntnMan on March 24, 2024, 04:35:06 pm ---Maybe it's a width issue????

--- End quote ---
What is the field width of the used SQL?

Maybe try with a SQL where you cut off the longer strings (with SUBSTRING or something)?

State is probably a CHAR(2) so is always limited in size.
But if your COMPANYNAME is VARCHAR(100) or higher, it could be that the maximum possible string is taken, resulting in the other columns being pushed out of view.

   See below screenshots of the Properties for the JvDBLookUpCombo. I've experimented with basically AutoSize & the RightTrimmedLookUp turning one off and the other on, vise versa or with both on.  These screen shots are for State/Provinces lookup, i.e. State Code and State Full Name. This works perfectly.  Now the State Code is primary/unique.  I can't tell from the properties have anything to do with an index.  See what you think:


[0] Message Index

[#] Next page

Go to full version