I am doing Server side auto filtering with OnItemsRequested. Is there a way to specify the minimum number of characters entered before doing a postback to retrieve data?
Question.
1) What is the server side coded need to activate these javascript functions?
2) How do you stop the WebDropDown from loading data when the form has no characters in the drop down, or when the drop down is first loaded on the page?
In other words I do not want to call the back end database (webmethod) until a person starts to type in the dropdown. I do not want to call the webmethod and get results to choose from until 3 character have been entered. If the person backspaces and starts over I want to unload the datalist from the control.
Thanks! It is working now.
Hello JMui,
Were you able to resolve this?
For any further questions do not hesitate to contact me.
Sincerely,
Georgi Sashev
Developer Support Engineer
Infragistics, Inc.
http://es.infragistics.com/support
Thank you for posting in our community. I have created a sample that reproduces this scenario. You can download it here and try it.
Note that in the sample I specified a minimum number of characters to be 3
I am handling the client side event ValueChanging
In this function:
function WebDropDown_ValueChanging(sender, eventArgs) {
if (eventArgs.getNewValue().length == 3) {
var combo2 = $find('<%= WebDropDown1.ClientID %>');
combo2.loadItems(eventArgs.getNewValue());
}
When the length is equal to three the ItemsRequested is fired.