I've read all the Methods, Properties, etc. and have now given up.
How do I "force" the AutoCompleteBox to process the last remaining text in the text box as if the user had actually typed in a ";" at the end. Specifically, when loosing focus, my users are not always entering in the delimiter ";" that then causes the control to tokenize the last word(s) they entered into the control. On loss of focus, I would like to see if there is any non-tokenized text in the control and then process/tokenize it.
I have tried hacking around by sending the control a ";" via SendKeys.Send(";") but that simply did not work (it was a horrible hack anyway). Any great ideas would be appreciated.
How do I "force" the AutoCompleteBox to process the last remaining text in the text box as if the user had actually typed in a ";" at the end. Specifically, when loosing focus, my users are not always entering in the delimiter ";" that then causes the control to tokenize the last word(s) they entered into the control. On loss of focus, I would like to see if there is any non-tokenized text in the control and then process/tokenize it.
I have tried hacking around by sending the control a ";" via SendKeys.Send(";") but that simply did not work (it was a horrible hack anyway). Any great ideas would be appreciated.
6 Answers, 1 is accepted
0
Accepted
Giovanni
Top achievements
Rank 1
Iron
Iron
Iron
answered on 26 Nov 2012, 04:23 PM
I have a similar problem, i.e. how to access to current untokenized string.
At the moment I used a workaround using this code:
But like you, I hope to know a better way,
At the moment I used a workaround using this code:
If
Me
.TxtValue.CaretIndex > 0
Then
Try
Dim
searchingText
As
String
=
Me
.TxtValue.Text.Substring(0, Math.Min(
Me
.TxtValue.CaretIndex,
Me
.TxtValue.Text.Length))
Dim
pos
As
Integer
= Math.Max(0, searchingText.LastIndexOf(
";"c
))
' Delete current untokenized text
Me
.TxtValue.
Select
(pos,
Me
.TxtValue.CaretIndex - pos)
Me
.TxtValue.Delete()
Catch
End
Try
End
If
Me
.TxtValue.AppendText(valueToSave &
";"c
)
But like you, I hope to know a better way,
0
Hello Guys,
@Dan: You can use the approach suggested by the Giovanni.
@Gioavanni: Thank you for your community effort. I have updated your Telerik points for your time and efforts.
Kind regards,
Svett
the Telerik team
@Dan: You can use the approach suggested by the Giovanni.
@Gioavanni: Thank you for your community effort. I have updated your Telerik points for your time and efforts.
Kind regards,
Svett
the Telerik team
0
Dan
Top achievements
Rank 1
answered on 29 Nov 2012, 02:48 AM
I've used something very similar to Giovanni's method (thanks!). In hindsight, my hack was horrible ;)
Please add a request for the development team to have an "auto submit" feature such that on loss of focus, whatever existing text the user has typed in is processed as if it was delimited. That would improve the usability of this control ten fold.
Thanks much!
Please add a request for the development team to have an "auto submit" feature such that on loss of focus, whatever existing text the user has typed in is processed as if it was delimited. That would improve the usability of this control ten fold.
Thanks much!
0
Hello Dan,
Thank you for your suggestion. We will consider it if we receive more requests about the same functionality. For the time being, feel free to use the approach discussed.
Greetings,
Svett
the Telerik team
Thank you for your suggestion. We will consider it if we receive more requests about the same functionality. For the time being, feel free to use the approach discussed.
Greetings,
Svett
the Telerik team
0
Fraser Tustian
Top achievements
Rank 1
answered on 28 May 2014, 05:22 AM
+1 request from me
This functionality is pretty critical
This functionality is pretty critical
0
Hi Fraser,
Thank you for your request. We will consider it in future control improvements.
Regards,
Dimitar
Telerik
Thank you for your request. We will consider it in future control improvements.
Regards,
Dimitar
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.