Hi, I want to load some items to WDD (with EnableCustomValue='true') from client-side on the first load of the page.
If the user makes any selection out of the pre-loaded items in the WDD, I will reload the page to show some related activity and also re-load the WDD control with the same initial items
But if the user tried to type in any text to perform a search (executed on server), I want to load the WDD with the search results and not the initial items list.
My question is, is there any ClientSide events e.g. Initialize that I can hook up, to load items into the WDD on each page load except when user performs a custom search? Please advice.
Thanks,
Hi a105019,
The Initialize handler function could be used to allow this. In Initialize, you could check if the user has entered any text in the text field with the get_currentValue() function.
Here is also a list of WebDropDown's other client events that may be useful for you:http://help.infragistics.com/NetAdvantage/ASPNET/2011.2/CLR4.0/?page=Infragistics4.Web.v11.2~Infragistics.Web.UI.ListControls.DropDownClientEvents_members.html
And here is our documentation that lists other available client side functions that may help:http://help.infragistics.com/NetAdvantage/ASPNET/2011.2/CLR4.0/?page=WebDropDown~Infragistics.Web.UI.WebDropDown_members.html
Please let me know if you need further assistance with this issue.
Hi Michael, It was not very clear from the events documentation ... so just wanted to follow-up.
Is there any Client or Server side events which can indicate that PostBack request came from user typing into the WebDropDown field (assume EnableCustomValues="true" EnableCustomValueSelection="false" for the WDD)?
I want to be able to isolate the scenario of selecting values from existing item collection Vs. typing a query text into the WDD to lookup matching items?
Thanks
After some testing, I've found that the server side ValueChanged event will only be fired when text is typed if you do not have any AutoPostBackFlags properties set and while using server side AutoFiltering.
You mentioned you were executing the search on the server, but I'm not sure if you have any AutoPostBackFlags set. If you do have this set, you may still be able to use some logic in the method to determine if the text was typed or selected.
If I'm understanding your desired setup correctly, you may be able to compare the ValueChangedEventArgs.NewValue to your pre-loaded items. If they are different, the user must have typed into the search box, otherwise the user selected it from the list.
Please see the following documentation for info on the ValueChangedEventArgs:http://help.infragistics.com/NetAdvantage/ASPNET/2011.2/CLR4.0/?page=Infragistics4.Web.v11.2~Infragistics.Web.UI.ListControls.DropDownValueChangedEventArgs_members.html
If you need further assistance, please let me know and I'll be glad to help.
Please let me know if you still need help with this issue.