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-upComboBox. DroppedDown:=True;
After you add the ITEM, add the code above is ok
CodePudding user response: