BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ComboBoxGridMasterDetail

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Model Driven Architecture (General)
View previous topic :: View next topic  
Author Message
Alan
Guest





PostPosted: Fri Feb 16, 2007 10:01 pm    Post subject: ComboBox\Grid\MasterDetail Reply with quote



I have a bold combobox and bold grid on a form. When the user selects
an account from the combobox, the grid displays the FamilyMembers for
that account. When the user types in an account in the combobox and it
auotfills, the grid does not refresh, it will only refresh when the
account is selected using the mouse. How do I get the grid to display
the FamilyMembers when the user types in the account vs using the mouse?

FamilyAcct 1--0..* FamilyMember 1..*


blhAccount
Expression=FamilyAcct.AllInstances
RootHandle=BoldSystemHandle

blhFamily
Expression=FamilyAcctFamily
RootHandle=blhAccount

TIA
Back to top
Efim Mett
Guest





PostPosted: Fri Feb 16, 2007 10:38 pm    Post subject: Re: ComboBox\Grid\MasterDetail Reply with quote



Hi Alan,

I don't quite sure what you mean but see the property "ApplyPolicy" of the
BoldCombobox. Perhaps that is what you are seeking

/Efim
Back to top
Alan
Guest





PostPosted: Fri Feb 16, 2007 11:55 pm    Post subject: Re: ComboBox\Grid\MasterDetail Reply with quote



Efim:

I tried changing this property but it did not make any difference. What
I am doing is using the combobox to display the account(master) and grid
to display the details in . It is for the user to view the familys that
are associated to an account. The combobox will auto display the
closest matching account number as the user types one in. Then I would
like for the grid to display the detail records in the grid. It works
as expected when the user selects an account from the combobox using a
mouse.

TIA

Efim Mett wrote:
Quote:
Hi Alan,

I don't quite sure what you mean but see the property "ApplyPolicy" of the
BoldCombobox. Perhaps that is what you are seeking

/Efim

Back to top
Dean Stow
Guest





PostPosted: Mon Mar 19, 2007 8:11 am    Post subject: Re: ComboBox\Grid\MasterDetail Reply with quote

I apologize for not answering sooner, but I have not been checking
this forum as regularly as I should.

There is a problem with TBoldComboBox

There was a suggested workaround in the quality central database.

I think this is the code that changes it.


unit UnitBXComboBox;

interface

uses
Classes, BoldComboBox, Messages, Windows, Forms,
BoldControlPackDefs,
UnitBXMessageConstants;

type
TBXComboBox = class (TBoldComboBox)
private
fProcessingClick : integer;
protected
procedure Click; override;
public
constructor Create (AOwner : TComponent); override;
published
property AutoComplete default True;
property AutoDropDown default False;
property AutoCloseUp default False;
end;

procedure Register;

implementation

{*** ***}
{*** Protected Declarations ***}
{*** ***}
{******************************************************************************}
procedure TBXComboBox.Click;
var
aMsg: TWMCommand;
begin
Inc(fProcessingClick);
try
inherited;
if fProcessingClick = 1
then
begin
with aMsg do
begin
Msg := WM_COMMAND;
NotifyCode := CBN_SELCHANGE;
ItemID := ItemIndex;
Ctl := Handle;
Result := 0;
end;
WndProc (TMessage(aMsg));
end;
finally
Dec (fProcessingClick);
end;
end;

{******************************************************************************}
constructor TBXComboBox.Create (AOwner : TComponent);
begin
inherited Create (AOwner);
BoldProperties.ApplyPolicy := bapChange;
end;



{******************************************************************************}
procedure Register;
begin
RegisterComponents ('BX', [TBXComboBox]);
end;



I hope this helps
Back to top
Dean Stow
Guest





PostPosted: Mon Mar 19, 2007 8:11 am    Post subject: Re: ComboBox\Grid\MasterDetail Reply with quote

I should have mentioned that this is to inherit a new combo box
component based on the original.

This helped some of the problems but did not solve them. The combo
boxes still did not work well when trying to choose a record by
incremental search (i.e. typing in the selection until the right one
is chosen from the list.)

I finally gave up on the combo boxes in favor of a regular bold edit
and a custom search dialog that is triggered when a character is
pressed in the edit.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Model Driven Architecture (General) All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.