| View previous topic :: View next topic |
| Author |
Message |
Alan Guest
|
Posted: Fri Feb 16, 2007 10:01 pm Post subject: ComboBox\Grid\MasterDetail |
|
|
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
|
Posted: Fri Feb 16, 2007 10:38 pm Post subject: Re: ComboBox\Grid\MasterDetail |
|
|
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
|
Posted: Fri Feb 16, 2007 11:55 pm Post subject: Re: ComboBox\Grid\MasterDetail |
|
|
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
|
Posted: Mon Mar 19, 2007 8:11 am Post subject: Re: ComboBox\Grid\MasterDetail |
|
|
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
|
Posted: Mon Mar 19, 2007 8:11 am Post subject: Re: ComboBox\Grid\MasterDetail |
|
|
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 |
|
 |
|