Home > Back-end >  Delphi cxgrid column combox drop-down list refreshes the great spirit body problems, and help
Delphi cxgrid column combox drop-down list refreshes the great spirit body problems, and help

Time:10-31

I in the properties of onchange according to user input fields to automatic fuzzy matching added combox database
But now it is on my return to switch to the next cell in a cell of combox items to flush out how to solve this problem???????


Procedure TJBSaleOrderForm. CxgrdbclmnCargoNamePropertiesChange (Sender: TObject);
Var
GoodsName: string;
The begin
Inherited;
GoodsName:=tbviewedit Controller. EditingController. Edit. EditingValue;//VarToStrDef (tbviewedit DataController. GetValue (tbviewedit. Controller. FocusedRecordIndex, cxgrdbclmnCargoName. Index), ");

TcxComboboxProperties (cxgrdbclmnCargoName Properties). The Items. The Clear;
If VarToStrDef (GoodsName, ' ') & lt;> "' then
The begin
With msq1 do
The begin
The Close;
SQL. The Clear;
SQL. Text:='SELECT DISTINCT TOP 5 CargoName FROM dbo. SaleOrderDetail WHERE dbo. SaleOrderDetail. CargoName LIKE' + QuotedStr GoodsName (' % '+ +' % ');
The Open;
end;
Tbviewedit. DataController. Post;
If not dm. MsqPUB. IsEmpty then
The begin
Dm. MsqPUB. First;
While not DM. MsqPUB. Eof do
The begin
TcxComboboxProperties (cxgrdbclmnCargoName Properties). The Items. The Add (msq1. FieldByName (' CargoName). AsString) are identical.

DM. MsqPUB. Next;
end;
end;
end;
end;

CodePudding user response:

ComboBox has an attribute can be manually pull next ITEM window pop-up

ComboBox. DroppedDown:=True;

After you add the ITEM, add the code above is ok

CodePudding user response:

reference 1st floor doloopcn response:
ComboBox has an attribute can be manually pull next ITEM window pop-up

ComboBox. DroppedDown:=True;

After you add the ITEM, add the code above is ok
thank you
  • Related