jahlxx Posted January 9, 2017 Share Posted January 9, 2017 Hi. Is possible to show the dblookupcombobox like a dbgrid? Could be useful to can show columns titles, order by columns, use AvPag and RePag, etc. Thanks. Link to comment Share on other sites More sharing options...
Sherzod Posted January 9, 2017 Share Posted January 9, 2017 Hi, Unfortunately, at the moment it is not possible Link to comment Share on other sites More sharing options...
jahlxx Posted January 9, 2017 Author Share Posted January 9, 2017 Ok. I have a workaround, but there are 2 things I don't know how to do: - I need only drop down when press a defined key, not when press the down arrow key - And drop down when click on the arrow button - And when I type something and match one row, the content of the lookoup doesn`t updates, I need to select the row in the drop down window. THanks. Link to comment Share on other sites More sharing options...
jahlxx Posted January 9, 2017 Author Share Posted January 9, 2017 The 3rd. behaviour hapens when define a onkeydown event of the dblookupcombo component. Link to comment Share on other sites More sharing options...
jahlxx Posted January 10, 2017 Author Share Posted January 10, 2017 OK. Forget all of the above, I've got it. 2 more things: - when the table data of the listsource of the combobox is updated, that data is nor refreshed in the combo the next time it is dropped-down. I'm forgetting something. - is possible to open the listsource dataset on-demand? thanks. Link to comment Share on other sites More sharing options...
jahlxx Posted January 10, 2017 Author Share Posted January 10, 2017 Other question about dblookupcombobox. Is possible define onclick event for the fieldlabel? Thanks. Link to comment Share on other sites More sharing options...
Sherzod Posted January 10, 2017 Share Posted January 10, 2017 Hi, Yes, it is possible, I will try to give you a decision later... Best regards. Link to comment Share on other sites More sharing options...
Sherzod Posted January 10, 2017 Share Posted January 10, 2017 Hi, Other question about dblookupcombobox. Is possible define onclick event for the fieldlabel? Try this: For example UniDBLookupComboBox1 -> ClientEvents->ExtEvents -> fn boxready: function boxready(sender, width, height, eOpts) { var labelEl = sender.labelEl; if (labelEl) { labelEl.setStyle('cursor', 'pointer'); labelEl.on('click', function(e) { // your logic, js fn or AjaxRequest(sender, ...) ajaxRequest(sender, '_labelClick', []); e.stopEvent(); // if you want to prevent "default" handler }) } } procedure TMainForm.UniDBLookupComboBox1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = '_labelClick' then ShowMessage('labelClick'); end; Link to comment Share on other sites More sharing options...
jahlxx Posted January 10, 2017 Author Share Posted January 10, 2017 ok, thanks. Link to comment Share on other sites More sharing options...
jahlxx Posted January 10, 2017 Author Share Posted January 10, 2017 I see one problem, and can reproduce in the samples. In the case of anymatch=true, when you direct input a valid key value, the combo don't refresh and don't take any value. you can test with the sample. type 1221, and press <tab>. the combo don't refresh and 1221 is a valid value. why? thanks. Link to comment Share on other sites More sharing options...
Sherzod Posted January 10, 2017 Share Posted January 10, 2017 Sorry, maybe I didn't quite understand your problem, but I couldn't reproduce...Can you clarify your issue again? Link to comment Share on other sites More sharing options...
jahlxx Posted January 11, 2017 Author Share Posted January 11, 2017 Ok. Run the dblookupcombo demo. In the anymatch, type 1221 and exit the combo, and you will see that the keyvalue is not updated. Link to comment Share on other sites More sharing options...
Sherzod Posted January 11, 2017 Share Posted January 11, 2017 Hi, Sorry, but I think this is the correct behavior ie, you wanted to say that the value is not selected when combo loses focus ?! Link to comment Share on other sites More sharing options...
jahlxx Posted January 11, 2017 Author Share Posted January 11, 2017 yes, that is what I mean. I don't agree this behaviour is correct. If 1221 is a valid value, the key value should be updated. Id the user knows the code and directly type it, is necessary to select a row of the combo? This could be time lost. Link to comment Share on other sites More sharing options...
Sherzod Posted January 11, 2017 Share Posted January 11, 2017 sorry, and what if a user enters 1221555 ?! Link to comment Share on other sites More sharing options...
jahlxx Posted January 11, 2017 Author Share Posted January 11, 2017 code invalid. you must validate the code entered before do any operation with it. Link to comment Share on other sites More sharing options...
Sherzod Posted January 11, 2017 Share Posted January 11, 2017 Then, can you try this for now ?!: UniDBLookupComboBox -> ClientEvents -> ExtEvents -> blur fn: function blur(sender, e, eOpts) { var me=sender; var picker=me.getPicker(); var store=me.getStore(); if (!me.value && picker && store.count()>0) { picker.select(0); me.setValue(picker.getSelectionModel().getSelection()[0].data.val); me.fireEvent("select"); } } Link to comment Share on other sites More sharing options...
jahlxx Posted January 11, 2017 Author Share Posted January 11, 2017 ok. and what about this? - when the table data of the listsource of the combobox is updated, that data is nor refreshed in the combo the next time it is dropped-down. I'm forgetting something. - is possible to open the listsource dataset on-demand? thanks. Link to comment Share on other sites More sharing options...
Sherzod Posted January 11, 2017 Share Posted January 11, 2017 - when the table data of the listsource of the combobox is updated, that data is nor refreshed in the combo the next time it is dropped-down. I'm forgetting something. Sorry, I couldn't reproduce this... Link to comment Share on other sites More sharing options...
Pier Posted February 28, 2021 Share Posted February 28, 2021 I confirm that the dropdown is not refreshed when the data in the listsource is updated (or a new row is added) 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