Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

ASPxTextBox - How to attach the jQuery AutoComplete plugin

$
0
0

This example illustrates how to attach the jQuery AutoComplete plugin to the ASPxTextBox editor.

Usually when it is necessary to attach jQuery selectors to any existing HTML content, it is recommended to use the $(document).ready function that can be employed for handling the state when DOM is fully loaded.

When using DevExpress ASP.NET Controls, it is recommended to handle the client-side ASPxClientGlobalEvents.ControlsInitialized event that is raised after client object models of all DevExpress web controls contained within the page have been initialized or the client-side ASPxClientControl.Init event (rather than the use of the jQuery $(document).ready function) of the required DevExpress ASP.NET control to ensure that a corresponding client-side control's programmatic object is initialized.

GlobalEvents.aspx:
This example illustrates how to use an invisible ASPxGlobalEvents component to initialize the required DevExpress ASP.NET control on the client side:
To get access to the client-side programmatic object of a particular DevExpress ASP.NET control, use the ClientInstanceName property (refer to the Client-Side API Availability for a Web Control topic in our documentation to learn more about the client-side API availability).

ControlEvents.aspx:
This example demonstrates how to use the control's client-side Init event where the client-side control's programmatic object is available directly via the "s" (sender) object (refer to the Client-Side Events topic in our documentation to learn more about common concepts of how to use client-side events of the DevExpress ASP.NET Controls).

Question Comments

Added By: Nathaniel M Nelson at: 4/25/2013 5:36:08 PM    

Had troubles attaching to an ASPxTextBox in a GridView popup form. Make sure to add a high z-index so that the autocomplete dropdown shows up on top of the form instead of behind it. Something like :

.ui-autocomplete
{
    z-index: 999999 !important;
}

Added By: Mike (DevExpress Support) at: 4/25/2013 11:34:38 PM    

Would you please create a new ticket in our Support Center regarding this issue and share your current progress with us?

Added By: Nathaniel M Nelson at: 4/29/2013 11:35:00 AM    

Sure Mike, I've created a ticket here:

http://www.devexpress.com/Support/Center/Question/Details/Q491906

Added By: Waqar Ahmed 3 at: 6/23/2014 3:41:41 PM    

Hi,
do you know why I get following error?

JavaScript runtime error: 'OnControlsInitialized' is undefined

Thanks
Waqar


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>