6 Answers, 1 is accepted
I guess you want to access the text typed in RadAutoCompleteBox on OnClientRequesting event. Please have a look into the following code snippet which works fine at my end.
Please elaborate your requirement if it doesn't help.
I does not work for me, the service stop s working and doe4s not return anything. If I use the following code the service returns fine. But I need to get a the value that is returned not the text.
This code works fien and the service starts returning itself tot he text box.
But this does not work and the service stops working when I try to get at the value its returning, It shouold return and ID and text of a persons name.
Above is the same way we do it for our Ajax Control Tool Kit service but the the javscript client commands are different.
OnClientItemSelected="SelectedName" - AjAxToolKit
So the question is how can I get at the selected value and do a autopostback event on the autocomplete textbox so that I can hit a database and pull values.
New to C# used to Vb way of doing things, figured out how to do the OntextChanged event in the code behind but I am getting nothing from the service and also do not see the actual autocomplete box post back either. My issue above still is the same to get at the value but also the autocomplete text box does not seem to post back.
The default InputType of the RadAutoCompleteBox is Token and in a Token scenario the TextChanged event could not be fired. I would suggest you to explicitly set the InputType to Text and use the TextChanged event handler, in order to get the Entry's value in the following manner for example :
Still no joy, It does not do a postback on the textchanged event, just do not think this control works like the ajaxcontroltoolkit variant which is much easier to use and get at both values. It seems as if this control is over complicated. Got this working using the radcombobox but it is just not as clean looking as a textbox option.
I had performed further tests locally and it seems that the TextChanged event is correctly triggered. I prepared a sample project for you, demonstrating the behavior at my end. In addition, here is a video on the matter. Could you give it a try at your end and let us know the results?
Note : DLL files are removed from the attachment.