Is there an event I can subscribe to on the tkPropertyEditor to know when the value in the editor has changed, or when a value has been selected from the inlineautocomplete picker? I haven't found anything in the documentation about what events are available for the propertyeditors.
Here's what I'm trying to do: using the inlineautocomplete editor, I'd like to update the valuesprovider list whenever the text within the editor changes, then respond to the selection whenever the user picks an item from the picker.
7 Answers, 1 is accepted
thank you for contacting us.
I reviewed your case and if I understand you correctly you are using DataForm component with Editor type "AutoCompleteInline" and you are looking for an event, which will be fired when a new item is picked from the available options.
In this you could use propertyCommittedEvent, which will notify you when the value of the editor is changed. For further info, you could review the documentation here or this example.
Hope this information helps
Regards,
nikolay.tsonev
Progress Telerik
Thanks for the response. I did see that event, but it doesn't seem to be quite what I'm looking for. I'm looking for an event that fires when the editor's text is changed, and not necessarily when the property is committed to the bound [source] object. Something like (changed) or (textChange) perhaps?
This would let me update the AutoCompleteInline's valuesprovider based on the current text in the control, even if the dataForm's commit-mode is set to manual or OnLostFocus. The end result here is that I could modify the autocomplete suggestion list dynamically as the user types based on the current text they have entered.
Indeed it is not currently possible to handle text change for the DataForm fields.
Regarding that, it would help if you could provide some more info about your specific case, the need of handling text change and what is the expected final result.
This will help us to understand your scenario and we may consider exposing such event for future releases.
Bear in mind that at this moment the Editor if type AutoCompleteInline, will filter the suggestions based on the current input
Best Regards,
nikolay.tsonev
Progress Telerik
Okay thanks, that's good to know; I'll stop trying to figure it out.
As for my specific case, I have a component I built that updates a list of suggestions (addresses, in this case) when the user types into a textfield. Since the suggestions come from a web service based on the currently entered text, I can't populate the suggestion source (valuesprovider) statically. So it would be nice to edit the source object using the telerik DataForm, but until there's a mechanism to react to editor text changes, I'll need to use my current solution.
In your specific scenario, I could suggest downloading all the needed information from the web service and while binding valuesProvider property. This will allow you to setup all suggestion runtime from code behind after the data has been download from the DB. Something more for this case you could add all addresses, which will be filtered regarding the input.
A Very similar example could be found here, for the DataForm field named "from".
Let me know, whether this is applicable for you.
Regards,
nikolay.tsonev
Progress Telerik
Indeed this downloading all available addresses from Google Place API will not be an appropriate solution.
Regarding that, I have logged new feature request about implementing functionality, which allows handling text changing. You could keep track on it for further info.
Best Regards,
nikolay.tsonev
Progress Telerik