Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 27 Apr 2024, 12:16

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 27 Dec 2012, 06:54 
Offline

Joined: 27 Dec 2012, 06:45
Posts: 5
hi,

I would like to put DBLookupComboBoxEh inside a DBGridEh,
How can i do this ?

Tia


Top
 Profile  
 
PostPosted: 27 Dec 2012, 11:36 
Offline

Joined: 19 Jan 2012, 20:54
Posts: 12
Why you don't use a lookup field?


Top
 Profile  
 
PostPosted: 27 Dec 2012, 13:19 
Offline

Joined: 27 Dec 2012, 06:45
Posts: 5
sinys wrote:
Why you don't use a lookup field?


I use lookup field. The problem IS
cannot access event OnKeyValueChanged from gridEh.
but this event available ONLY in DBLookupComboBoxEh.


Top
 Profile  
 
PostPosted: 02 Jan 2013, 17:14 
Offline
Администратор

Joined: 22 Dec 2011, 20:19
Posts: 335
Hello

How are you going to use the event?
May be in the grid you could use other event.

Best regards
Admin

_________________
Best regards
Admin


Top
 Profile  
 
PostPosted: 03 Jan 2013, 18:33 
Offline

Joined: 27 Dec 2012, 06:45
Posts: 5
Administrator wrote:
Hello

How are you going to use the event?
May be in the grid you could use other event.

Best regards
Admin


Here's the case : in my order entry system
when user select part, prices of the part will be assigned to order item
as shown in the following code

procedure TForm1.DBLookupCombobox1KeyValueChanged(Sender: TObject);
begin
if Datasource1.State in [dsEdit,dsInsert] then begin
OitemHunit.value := VPartPacket_buy.Value; //price of part assigned to item
OitemHpacket.value := VPartPacket_sell.Value;
end;

end;

I can only get this done in this EVENT, no event in the grid can make this.
OR do i miss something ???


Top
 Profile  
 
PostPosted: 15 Jan 2013, 14:20 
Offline

Joined: 15 Jan 2013, 13:31
Posts: 2
sorry, I have bad english... you can use for it Field.OnChange like this

procedure Tfm_Binar.mt_BinarParentContractIDChange(Sender: TField);
begin
mt_BinarParentContractID.OnChange := nil;
mt_BinarParentID.Value := mt_ParentsListID.Value;
mt_BinarParentContractID.Value := mt_ParentsListContractID.Value;
mt_BinarParentContractID.OnChange := mt_BinarParentContractIDChange;
end;

where
mt_Binar - TMemTableEh
ParentContractID - FieldName


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 71 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group