jeans_larghi Posted May 21, 2015 Posted May 21, 2015 version 0.99 UniComboBox -remote query with fixed list Hello Farshad , there is a way to prevent bad input or errors? For ex: DevExpress cxDBLookupCombobox can sets the DropDownListStyle to lsFixedList for avoid user input of casual value in combo editor.. Is this possible with uniComboBox with remote query? I want that ONLY correct values can be typed; if i add some "not found" chars, edit value must revert to latest right value. Best regards. 1 Quote
Sherzod Posted September 5, 2019 Posted September 5, 2019 1 minute ago, rgreat said: Up! Hi, About what?! Quote
rgreat Posted September 5, 2019 Posted September 5, 2019 UniCombobox with remote query where you can only select items from list. I'd like to get UniCombobox.itemindex working with remote query enabled. Not working for me now. And also like to auto-revert user typed input when i exit UniCombobox if no item is selected. So to summarise i'd like to have UniCombobox with csDropDownList itemindex behaviour but with option to search through it like on csDropDown+remote query. Quote
Sherzod Posted September 6, 2019 Posted September 6, 2019 6 hours ago, rgreat said: UniCombobox with remote query where you can only select items from list. I'd like to get UniCombobox.itemindex working with remote query enabled. Not working for me now. Hi, Can you make a simple testcase for this?.. Quote
rgreat Posted December 9, 2019 Posted December 9, 2019 On 9/6/2019 at 7:25 AM, Sherzod said: Hi, Can you make a simple testcase for this?.. procedure TMainForm.UniComboBox1RemoteQuery(const QueryString: string; Result: TStrings); var i: Integer; begin Result.Clear; for i:=1 to 9 do begin Result.Add(i.ToString); end; end; 1. 2. Even if you change UniCombobox.Style to csDropDownList nothing will change. ItemIndex will still be -1. This make impossible to reliably select item in list unless you fallback to dirty tricks like adding ID in listbox item text. test.zip Quote
zhyhero Posted December 12, 2019 Posted December 12, 2019 Try ajaxRequest. UniCombobox -> ClientEvents -> ExtEvents -> beforeselect : function beforeselect(combo, record, index, eOpts) { ajaxRequest(combo,'bselect',['index='+index]); } UniCombobox -> OnAjaxEvent : procedure TMainForm.UniComboBoxAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if SameText(EventName,'bselect') then begin self.ShowToast(Params.Values['index']); end; end; Quote
rgreat Posted December 12, 2019 Posted December 12, 2019 5 hours ago, zhyhero said: Try ajaxRequest. Thank you. It would be nice if this bug would be fixed, though. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.