jeans_larghi Posted May 21, 2015 Share 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 Link to comment Share on other sites More sharing options...
rgreat Posted September 5, 2019 Share Posted September 5, 2019 Up! Link to comment Share on other sites More sharing options...
Sherzod Posted September 5, 2019 Share Posted September 5, 2019 1 minute ago, rgreat said: Up! Hi, About what?! Link to comment Share on other sites More sharing options...
rgreat Posted September 5, 2019 Share 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. Link to comment Share on other sites More sharing options...
Sherzod Posted September 6, 2019 Share 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?.. Link to comment Share on other sites More sharing options...
rgreat Posted December 9, 2019 Share 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 Link to comment Share on other sites More sharing options...
zhyhero Posted December 12, 2019 Share 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; Link to comment Share on other sites More sharing options...
rgreat Posted December 12, 2019 Share Posted December 12, 2019 5 hours ago, zhyhero said: Try ajaxRequest. Thank you. It would be nice if this bug would be fixed, though. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now