OnClientItemsRequestingHandler issue: sender._cachedText is blank

3 posts, 1 answers
  1. nk
    nk avatar
    3 posts
    Member since:
    Mar 2010

    Posted 09 Feb 2011 Link to this post

    I've handled OnClientItemsRequesting for radComboBox. Below is the handler code.

    function OnClientItemsRequestingHandler(sender, eventArgs)
    {
        if (sender._cachedText != unescape(sender._callbacktext))
        {
            sender.clearItems();
        }
    }


    I'm clearing out all items from the combobox before callback if the search text has changed since last callback.
    sender._cachedText gives current value entered for search in combobox
    sender._callbacktext gives last callback value.
    I get the intended behavior in IE all versions.Whne user changes searchtext, items are cleared (as both the text are different). When user clicks on More Results box, the items are not cleared (as both the text are same)

    When in Firefox, sender._cachedText  is always empty. Cant figure out why.
  2. Answer
    Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 15 Feb 2011 Link to this post

    Hi nk,

    The _cachedText is initialized in a different way under Internet Explorer and Firefox and this is by design.
    Let me suggest you use the sender._originalText and sender.get_text() instead.

    Kind regards,
    Kalina
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. nk
    nk avatar
    3 posts
    Member since:
    Mar 2010

    Posted 15 Feb 2011 Link to this post

    I've used eventArgs.get_text()

Back to Top