WHEN I USED THE DBLOOKUP COMOBO BOX ON A NEXTDBGRID IT DOESN'T LOOK FOR THE KEYID OF THE TABLE IT LOOKS FOR THE NAME INSTEAD, WHAT IF I HAVE TO DUPLICATE NAMES. BUT I'VE REPROGRAMED DE CODE SO IT CAN RETREIVE THE CORRECT RECORD WITH THE KEY AND ALSO RETURN THE KEY VALUE OF THAT RECORD. YOU SOULD FIX THIS BUG. AND I HAVE ALSO FIX A LOT OF OTHER BUGS.
NEXTDBGrid LookUp HAS A BUG
Started by jrag1976, Dec 21 2006 04:45 AM
2 replies to this topic
#1
Posted 21 December 2006 - 04:45 AM
#2
Posted 21 December 2006 - 06:18 AM
Hello,
It is designed to work that way, I only can add a option to look for key too.
I am working on every bug, and lot of them are already fixed long ago. There allways some smaller and hidden bugs that are hard to find.
It is designed to work that way, I only can add a option to look for key too.
I am working on every bug, and lot of them are already fixed long ago. There allways some smaller and hidden bugs that are hard to find.
boki@bergsoft.net
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#3
Posted 14 February 2011 - 12:26 PM
QUOTE (Boki (Berg) @ Dec 21 2006, 06:18 AM) <{POST_SNAPBACK}>
Hello,
It is designed to work that way, I only can add a option to look for key too.
I am working on every bug, and lot of them are already fixed long ago. There allways some smaller and hidden bugs that are hard to find.
It is designed to work that way, I only can add a option to look for key too.
I am working on every bug, and lot of them are already fixed long ago. There allways some smaller and hidden bugs that are hard to find.
Hi,
I just noticed this bug-report for the Lookup-control.
As a temporary solution I am using a standard combobox with the 'key value' assigned to the objects in the itemlist of the control.
Example :
- set the column to 'DbComboboxColumn', fieldname set to 'name'
- create a query for the list you want to use and fill the items-property like this :
While not MyListQuery.Eof do
begin
iName := MyList.Query.FieldByName('Name').AsString;
iKey := MyList.Query.FieldByName('Id').AsString;
colProductName.Items.AddObject( iName, TObject(iKey));
end;
- add an event to the 'onselectEvent' to set the value in your table.
CODE
if Sender is TNxDBComboBoxColumn then
begin
iColumn := Sender as TNxDBComboBoxColumn;
iIndex := TNxComboBox(iColumn.Editor).ItemIndex;
if(iIndex > -1) then
begin
iForeignKeyValue := integer(iColumn.Items.Objects[iIndex]);
// save this value to the field you want in your table
end;
end;
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











