Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
5368
Select all text in input box when focus
posted

I just wanted to be able to have all of the text selected when the user clicks inside the input box.  The WebTextEditor has a property that makes this easy, but couldn't find anything built into the WebDropDown that could accomplish this... even with the CSOM.

This bit of code does the trick:

 

    <script type="text/javascript" id="igClientScript1">
<!--

        function wddRouteBookID_Focus(sender, eventArgs) {
            ///<summary>
            ///
            ///</summary>
            ///<param name="sender" type="Infragistics.Web.UI.WebDropDown"></param>
            ///<param name="eventArgs" type="Infragistics.Web.UI.DropDownControlEventArgs"></param>

            sender._elements.Input.select();
        }// -->
    </script>

Not crazy about using one of the internal functions, but it is the only way I could figure how to do this.