Accessing the AutoCompleteBoxItemData attributes client side

14 posts, 0 answers
  1. Courtenay
    Courtenay avatar
    22 posts
    Member since:
    Oct 2007

    Posted 06 Feb 2013 Link to this post

    Hi there,

    Ive bound successfully to my web service and am returning the required data using the following:

    foreach (Site site in sites)
     {
                    AutoCompleteBoxItemData childNode = new AutoCompleteBoxItemData();
                    childNode.Text = site.PublicName;
                    childNode.Value = site.SiteId.ToString();
                    childNode.Attributes.Add("PublicUrl", site.PublicUrl);
                    childNode.Attributes.Add("Description", site.Description);
                    result.Add(childNode);
    }

    How do I access though attributes (PublicUrl etc) client side in my OnClientEntryAdded method:

    function onEntryCalendarAdded(sender, eventArgs)
     {
                    debugger;
                    var controlEntry = eventArgs.get_entry();
                    // gain access to public url etc here
    }
  2. Mike
    Mike avatar
    59 posts
    Member since:
    Jan 2008

    Posted 21 Feb 2013 Link to this post

    Hello,

    Did you have any luck with this? I'm trying to do something similar binding a ClientDropDownItemTemplate and using an attribute and haven't had any luck...

    Thanks,

    Mike
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 26 Feb 2013 Link to this post

    Hello,

    The attributes collection of entries is accessible at client-side. However, I am glad to inform you that we plan to introduce this functionality with our upcoming Service Pack.

    All the best,
    Nencho
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  5. Diana
    Diana avatar
    18 posts
    Member since:
    Nov 2012

    Posted 10 Mar 2013 Link to this post

    How can we access them client-side? I've tried every possible thing and nothing works. How can I get the attributes of a certain entry using JavaScript?
  6. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 12 Mar 2013 Link to this post

    Hello,

    The attributes collection of entries is Not accessible at client-side. Therefor we plan to introduce this functionality with the upcoming Service Pack. Please excuse me for my mistake.

    Regards,
    Nencho
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  7. Albert Shenker
    Albert Shenker avatar
    550 posts
    Member since:
    Mar 2004

    Posted 13 May 2013 Link to this post

    I am interested in the client-side attributes collection of the autocomplete box as a whole, not necessarily in individual entries... however I assume they go hand in hand. Any idea when we will be able to access the attributes client-side? Given that most of your controls have an attributes collection which is accessible client-side, I am surprised you would release a new control without this functionality.
  8. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 16 May 2013 Link to this post

    Hello Albert,

    The desired functionality is already logged as an improvement for the RadAutoCompleteBox. But, I am afraid that I cannot provide you with an exact timeframe for the release of this feature.

    Kind regards,
    Nencho
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  9. Albert Shenker
    Albert Shenker avatar
    550 posts
    Member since:
    Mar 2004

    Posted 16 May 2013 Link to this post

    I have to say that is quite troubling, Nencho. Since your post on March 12, where you said that this sort of functionality will be included in the next service pack there have been two service packs. And now you are saying you don't know when it will be included. In the past this sort of response from Telerik has typically meant it would be at least a year if not quite a bit longer for something to be done. If there's some sort of technical reason for a large delay, then I think we'd all appreciate an explanation. If not, then there really is no excuse. This functionality is not an "Improvement", its a complete oversight. As I mentioned previously, it should have been part of the initial release of the control, since it is native to the way just about every other Telerik control works.
  10. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 21 May 2013 Link to this post

    Hello Albert,

    The fix didn't make it to the first ServicePack we didn't have sufficient time and resources to implement it. The second ServicePack included only some Validation fixes, that were crucial for our users, and didn't contain any other control fixes of features.

    Also, at the time of writing of the previous post it didn't seem feasible that we would have enough time to fit this fix into our schedule, and that's why we couldn't commit on the release date being the next major Q.

    However since then we have re-examined the issue and we managed to resolve it, so it would be available in the 2013 Q2 release, which comes out in mid June.

    Kind regards,
    Nencho
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  11. Albert Shenker
    Albert Shenker avatar
    550 posts
    Member since:
    Mar 2004

    Posted 21 May 2013 Link to this post

    ok. thanks for the update.
  12. Duncan
    Duncan avatar
    1 posts
    Member since:
    Dec 2012

    Posted 19 Aug 2013 Link to this post

    So did this make it into the 2013 Q2 release?  If it did, how do we access the attributes client-side?  

    Thanks!
  13. Bozhidar
    Admin
    Bozhidar avatar
    1101 posts

    Posted 22 Aug 2013 Link to this post

    Hello Duncan,

    The feature did make it to the 2013 Q2 release, as stated in the release notes here:
    http://www.telerik.com/products/aspnet-ajax/whats-new/release-history/q2-2013-version-2013-2-611.aspx

    I've also attached a small sample page demonstrating how you can access the attributes on the client.
     

    Regards,
    Bozhidar
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  14. Glen
    Glen avatar
    2 posts
    Member since:
    May 2014

    Posted 09 Sep 2014 Link to this post

    Is there a way to access the attributes when the input type is set to "Text" because I am getting an error when trying to retrieve an attribute using the sample code "alert(args.get_entry().get_attributes().getAttribute("attr"));"

    I am getting a  JavaScript runtime error: Object doesn't support property or method 'get_entry' .... any thoughts would truly be appreciated.


    Glen
  15. Bozhidar
    Admin
    Bozhidar avatar
    1101 posts

    Posted 10 Sep 2014 Link to this post

    Hello,

    The OnClientTextChanged event event args contain only the get_text() function, as explained in our online documentation:
    http://www.telerik.com/help/aspnet-ajax/autocompletebox-onclienttextchanged.html

    This is because in text mode the AutoCompleteBox works in terms of pure text, rather than entries, which is why in text mode attributes are not supported.

    Regards,
    Bozhidar
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017